/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.pl /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- Graph construction failed Graph construction failed Graph construction failed YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.pl # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Left Termination of the query pattern move(g,g,g,g) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) IntegerArithmeticTransformerProof [SOUND, 0 ms] (2) Prolog (3) UnifyTransformerProof [EQUIVALENT, 0 ms] (4) Prolog (5) UndefinedPredicateHandlerProof [SOUND, 0 ms] (6) Prolog (7) PrologToPiTRSProof [SOUND, 24 ms] (8) PiTRS (9) DependencyPairsProof [EQUIVALENT, 1055 ms] (10) PiDP (11) DependencyGraphProof [EQUIVALENT, 0 ms] (12) AND (13) PiDP (14) UsableRulesProof [EQUIVALENT, 0 ms] (15) PiDP (16) PiDPToQDPProof [SOUND, 0 ms] (17) QDP (18) QDPSizeChangeProof [EQUIVALENT, 0 ms] (19) YES (20) PiDP (21) UsableRulesProof [EQUIVALENT, 0 ms] (22) PiDP (23) PiDPToQDPProof [SOUND, 0 ms] (24) QDP (25) QDPSizeChangeProof [EQUIVALENT, 0 ms] (26) YES (27) PiDP (28) UsableRulesProof [EQUIVALENT, 0 ms] (29) PiDP (30) PiDPToQDPProof [EQUIVALENT, 0 ms] (31) QDP (32) QDPSizeChangeProof [EQUIVALENT, 0 ms] (33) YES (34) PiDP (35) UsableRulesProof [EQUIVALENT, 0 ms] (36) PiDP (37) PiDPToQDPProof [SOUND, 0 ms] (38) QDP (39) TransformationProof [EQUIVALENT, 0 ms] (40) QDP (41) TransformationProof [EQUIVALENT, 0 ms] (42) QDP (43) TransformationProof [EQUIVALENT, 0 ms] (44) QDP (45) TransformationProof [EQUIVALENT, 0 ms] (46) QDP (47) TransformationProof [EQUIVALENT, 0 ms] (48) QDP (49) TransformationProof [EQUIVALENT, 0 ms] (50) QDP (51) QDPQMonotonicMRRProof [EQUIVALENT, 205 ms] (52) QDP (53) UsableRulesProof [EQUIVALENT, 0 ms] (54) QDP (55) QReductionProof [EQUIVALENT, 0 ms] (56) QDP (57) QDPQMonotonicMRRProof [EQUIVALENT, 168 ms] (58) QDP (59) UsableRulesProof [EQUIVALENT, 0 ms] (60) QDP (61) QReductionProof [EQUIVALENT, 0 ms] (62) QDP (63) QDPQMonotonicMRRProof [EQUIVALENT, 180 ms] (64) QDP (65) QReductionProof [EQUIVALENT, 0 ms] (66) QDP (67) QDPQMonotonicMRRProof [EQUIVALENT, 119 ms] (68) QDP (69) QReductionProof [EQUIVALENT, 0 ms] (70) QDP (71) TransformationProof [SOUND, 0 ms] (72) QDP (73) TransformationProof [EQUIVALENT, 0 ms] (74) QDP (75) TransformationProof [EQUIVALENT, 0 ms] (76) QDP (77) TransformationProof [EQUIVALENT, 0 ms] (78) QDP (79) TransformationProof [EQUIVALENT, 0 ms] (80) QDP (81) TransformationProof [EQUIVALENT, 0 ms] (82) QDP (83) TransformationProof [EQUIVALENT, 0 ms] (84) QDP (85) TransformationProof [SOUND, 0 ms] (86) QDP (87) TransformationProof [EQUIVALENT, 0 ms] (88) QDP (89) TransformationProof [EQUIVALENT, 0 ms] (90) QDP (91) TransformationProof [EQUIVALENT, 0 ms] (92) QDP (93) TransformationProof [EQUIVALENT, 0 ms] (94) QDP (95) TransformationProof [EQUIVALENT, 0 ms] (96) QDP (97) TransformationProof [EQUIVALENT, 0 ms] (98) QDP (99) TransformationProof [EQUIVALENT, 0 ms] (100) QDP (101) TransformationProof [EQUIVALENT, 0 ms] (102) QDP (103) TransformationProof [EQUIVALENT, 1 ms] (104) QDP (105) TransformationProof [EQUIVALENT, 0 ms] (106) QDP (107) TransformationProof [EQUIVALENT, 0 ms] (108) QDP (109) TransformationProof [SOUND, 0 ms] (110) QDP (111) TransformationProof [EQUIVALENT, 0 ms] (112) QDP (113) TransformationProof [EQUIVALENT, 0 ms] (114) QDP (115) TransformationProof [EQUIVALENT, 0 ms] (116) QDP (117) TransformationProof [EQUIVALENT, 0 ms] (118) QDP (119) TransformationProof [EQUIVALENT, 0 ms] (120) QDP (121) TransformationProof [EQUIVALENT, 0 ms] (122) QDP (123) TransformationProof [EQUIVALENT, 0 ms] (124) QDP (125) TransformationProof [EQUIVALENT, 3 ms] (126) QDP (127) TransformationProof [EQUIVALENT, 0 ms] (128) QDP (129) TransformationProof [EQUIVALENT, 0 ms] (130) QDP (131) TransformationProof [EQUIVALENT, 0 ms] (132) QDP (133) TransformationProof [SOUND, 0 ms] (134) QDP (135) DependencyGraphProof [EQUIVALENT, 0 ms] (136) QDP (137) TransformationProof [EQUIVALENT, 0 ms] (138) QDP (139) TransformationProof [EQUIVALENT, 0 ms] (140) QDP (141) TransformationProof [EQUIVALENT, 0 ms] (142) QDP (143) TransformationProof [EQUIVALENT, 0 ms] (144) QDP (145) TransformationProof [EQUIVALENT, 0 ms] (146) QDP (147) TransformationProof [EQUIVALENT, 0 ms] (148) QDP (149) QDPQMonotonicMRRProof [EQUIVALENT, 227 ms] (150) QDP (151) TransformationProof [EQUIVALENT, 0 ms] (152) QDP (153) TransformationProof [EQUIVALENT, 0 ms] (154) QDP (155) TransformationProof [SOUND, 0 ms] (156) QDP (157) DependencyGraphProof [EQUIVALENT, 0 ms] (158) TRUE (159) PiDP (160) UsableRulesProof [EQUIVALENT, 0 ms] (161) PiDP (162) PiDPToQDPProof [SOUND, 0 ms] (163) QDP (164) TransformationProof [EQUIVALENT, 0 ms] (165) QDP (166) TransformationProof [EQUIVALENT, 0 ms] (167) QDP (168) TransformationProof [EQUIVALENT, 5 ms] (169) QDP (170) TransformationProof [EQUIVALENT, 0 ms] (171) QDP (172) TransformationProof [EQUIVALENT, 0 ms] (173) QDP (174) TransformationProof [EQUIVALENT, 3 ms] (175) QDP (176) TransformationProof [EQUIVALENT, 0 ms] (177) QDP (178) TransformationProof [EQUIVALENT, 0 ms] (179) QDP (180) TransformationProof [EQUIVALENT, 22 ms] (181) QDP (182) TransformationProof [EQUIVALENT, 0 ms] (183) QDP (184) TransformationProof [EQUIVALENT, 0 ms] (185) QDP (186) TransformationProof [EQUIVALENT, 0 ms] (187) QDP (188) TransformationProof [EQUIVALENT, 0 ms] (189) QDP (190) TransformationProof [EQUIVALENT, 0 ms] (191) QDP (192) TransformationProof [EQUIVALENT, 0 ms] (193) QDP (194) TransformationProof [EQUIVALENT, 0 ms] (195) QDP (196) TransformationProof [EQUIVALENT, 0 ms] (197) QDP (198) TransformationProof [EQUIVALENT, 0 ms] (199) QDP (200) TransformationProof [SOUND, 0 ms] (201) QDP (202) TransformationProof [EQUIVALENT, 41 ms] (203) QDP (204) TransformationProof [EQUIVALENT, 33 ms] (205) QDP (206) TransformationProof [EQUIVALENT, 15 ms] (207) QDP (208) TransformationProof [EQUIVALENT, 6 ms] (209) QDP (210) TransformationProof [EQUIVALENT, 0 ms] (211) QDP (212) TransformationProof [EQUIVALENT, 0 ms] (213) QDP (214) TransformationProof [SOUND, 0 ms] (215) QDP (216) TransformationProof [EQUIVALENT, 23 ms] (217) QDP (218) TransformationProof [EQUIVALENT, 0 ms] (219) QDP (220) TransformationProof [EQUIVALENT, 7 ms] (221) QDP (222) TransformationProof [EQUIVALENT, 13 ms] (223) QDP (224) TransformationProof [EQUIVALENT, 0 ms] (225) QDP (226) TransformationProof [EQUIVALENT, 55 ms] (227) QDP (228) TransformationProof [EQUIVALENT, 41 ms] (229) QDP (230) TransformationProof [EQUIVALENT, 37 ms] (231) QDP (232) TransformationProof [EQUIVALENT, 30 ms] (233) QDP (234) TransformationProof [EQUIVALENT, 22 ms] (235) QDP (236) TransformationProof [EQUIVALENT, 35 ms] (237) QDP (238) TransformationProof [SOUND, 0 ms] (239) QDP (240) TransformationProof [EQUIVALENT, 35 ms] (241) QDP (242) TransformationProof [EQUIVALENT, 0 ms] (243) QDP (244) TransformationProof [EQUIVALENT, 0 ms] (245) QDP (246) TransformationProof [EQUIVALENT, 6 ms] (247) QDP (248) TransformationProof [EQUIVALENT, 54 ms] (249) QDP (250) TransformationProof [EQUIVALENT, 45 ms] (251) QDP (252) TransformationProof [EQUIVALENT, 26 ms] (253) QDP (254) TransformationProof [EQUIVALENT, 13 ms] (255) QDP (256) TransformationProof [EQUIVALENT, 0 ms] (257) QDP (258) TransformationProof [EQUIVALENT, 0 ms] (259) QDP (260) TransformationProof [EQUIVALENT, 55 ms] (261) QDP (262) TransformationProof [SOUND, 0 ms] (263) QDP (264) TransformationProof [EQUIVALENT, 0 ms] (265) QDP (266) TransformationProof [EQUIVALENT, 40 ms] (267) QDP (268) TransformationProof [EQUIVALENT, 0 ms] (269) QDP (270) TransformationProof [EQUIVALENT, 27 ms] (271) QDP (272) TransformationProof [EQUIVALENT, 0 ms] (273) QDP (274) TransformationProof [EQUIVALENT, 15 ms] (275) QDP (276) TransformationProof [SOUND, 0 ms] (277) QDP (278) TransformationProof [EQUIVALENT, 10 ms] (279) QDP (280) TransformationProof [EQUIVALENT, 0 ms] (281) QDP (282) TransformationProof [EQUIVALENT, 17 ms] (283) QDP (284) TransformationProof [EQUIVALENT, 30 ms] (285) QDP (286) TransformationProof [EQUIVALENT, 24 ms] (287) QDP (288) TransformationProof [EQUIVALENT, 1 ms] (289) QDP (290) TransformationProof [EQUIVALENT, 46 ms] (291) QDP (292) TransformationProof [EQUIVALENT, 30 ms] (293) QDP (294) TransformationProof [EQUIVALENT, 10 ms] (295) QDP (296) TransformationProof [EQUIVALENT, 52 ms] (297) QDP (298) TransformationProof [EQUIVALENT, 38 ms] (299) QDP (300) TransformationProof [SOUND, 0 ms] (301) QDP (302) TransformationProof [EQUIVALENT, 41 ms] (303) QDP (304) TransformationProof [EQUIVALENT, 27 ms] (305) QDP (306) TransformationProof [EQUIVALENT, 30 ms] (307) QDP (308) TransformationProof [EQUIVALENT, 0 ms] (309) QDP (310) TransformationProof [EQUIVALENT, 13 ms] (311) QDP (312) TransformationProof [EQUIVALENT, 52 ms] (313) QDP (314) TransformationProof [EQUIVALENT, 0 ms] (315) QDP (316) TransformationProof [EQUIVALENT, 32 ms] (317) QDP (318) TransformationProof [EQUIVALENT, 0 ms] (319) QDP (320) TransformationProof [EQUIVALENT, 10 ms] (321) QDP (322) TransformationProof [EQUIVALENT, 0 ms] (323) QDP (324) TransformationProof [SOUND, 0 ms] (325) QDP (326) TransformationProof [EQUIVALENT, 32 ms] (327) QDP (328) TransformationProof [EQUIVALENT, 22 ms] (329) QDP (330) TransformationProof [EQUIVALENT, 60 ms] (331) QDP (332) TransformationProof [EQUIVALENT, 8 ms] (333) QDP (334) TransformationProof [EQUIVALENT, 13 ms] (335) QDP (336) TransformationProof [EQUIVALENT, 56 ms] (337) QDP (338) TransformationProof [SOUND, 0 ms] (339) QDP (340) TransformationProof [EQUIVALENT, 0 ms] (341) QDP (342) TransformationProof [EQUIVALENT, 14 ms] (343) QDP (344) TransformationProof [EQUIVALENT, 44 ms] (345) QDP (346) TransformationProof [EQUIVALENT, 0 ms] (347) QDP (348) TransformationProof [EQUIVALENT, 55 ms] (349) QDP (350) TransformationProof [EQUIVALENT, 48 ms] (351) QDP (352) TransformationProof [EQUIVALENT, 64 ms] (353) QDP (354) TransformationProof [EQUIVALENT, 40 ms] (355) QDP (356) TransformationProof [EQUIVALENT, 2 ms] (357) QDP (358) TransformationProof [EQUIVALENT, 38 ms] (359) QDP (360) TransformationProof [EQUIVALENT, 60 ms] (361) QDP (362) TransformationProof [SOUND, 0 ms] (363) QDP (364) TransformationProof [EQUIVALENT, 0 ms] (365) QDP (366) TransformationProof [EQUIVALENT, 2 ms] (367) QDP (368) TransformationProof [EQUIVALENT, 13 ms] (369) QDP (370) TransformationProof [EQUIVALENT, 9 ms] (371) QDP (372) TransformationProof [EQUIVALENT, 0 ms] (373) QDP (374) TransformationProof [EQUIVALENT, 0 ms] (375) QDP (376) TransformationProof [EQUIVALENT, 63 ms] (377) QDP (378) TransformationProof [EQUIVALENT, 37 ms] (379) QDP (380) TransformationProof [EQUIVALENT, 17 ms] (381) QDP (382) TransformationProof [EQUIVALENT, 21 ms] (383) QDP (384) TransformationProof [EQUIVALENT, 47 ms] (385) QDP (386) TransformationProof [SOUND, 0 ms] (387) QDP (388) DependencyGraphProof [EQUIVALENT, 0 ms] (389) QDP (390) TransformationProof [SOUND, 0 ms] (391) QDP (392) DependencyGraphProof [EQUIVALENT, 0 ms] (393) QDP (394) TransformationProof [SOUND, 0 ms] (395) QDP (396) DependencyGraphProof [EQUIVALENT, 0 ms] (397) QDP (398) TransformationProof [EQUIVALENT, 0 ms] (399) QDP (400) TransformationProof [EQUIVALENT, 0 ms] (401) QDP (402) TransformationProof [EQUIVALENT, 0 ms] (403) QDP (404) TransformationProof [EQUIVALENT, 0 ms] (405) QDP (406) TransformationProof [EQUIVALENT, 0 ms] (407) QDP (408) TransformationProof [EQUIVALENT, 0 ms] (409) QDP (410) TransformationProof [EQUIVALENT, 0 ms] (411) QDP (412) TransformationProof [EQUIVALENT, 0 ms] (413) QDP (414) TransformationProof [EQUIVALENT, 0 ms] (415) QDP (416) TransformationProof [EQUIVALENT, 0 ms] (417) QDP (418) TransformationProof [EQUIVALENT, 0 ms] (419) QDP (420) TransformationProof [EQUIVALENT, 0 ms] (421) QDP (422) TransformationProof [EQUIVALENT, 0 ms] (423) QDP (424) TransformationProof [EQUIVALENT, 0 ms] (425) QDP (426) TransformationProof [EQUIVALENT, 0 ms] (427) QDP (428) TransformationProof [EQUIVALENT, 0 ms] (429) QDP (430) TransformationProof [EQUIVALENT, 0 ms] (431) QDP (432) TransformationProof [EQUIVALENT, 0 ms] (433) QDP (434) TransformationProof [EQUIVALENT, 0 ms] (435) QDP (436) TransformationProof [EQUIVALENT, 0 ms] (437) QDP (438) TransformationProof [EQUIVALENT, 0 ms] (439) QDP (440) TransformationProof [EQUIVALENT, 0 ms] (441) QDP (442) TransformationProof [EQUIVALENT, 0 ms] (443) QDP (444) TransformationProof [EQUIVALENT, 30 ms] (445) QDP (446) TransformationProof [EQUIVALENT, 59 ms] (447) QDP (448) TransformationProof [EQUIVALENT, 0 ms] (449) QDP (450) QDPOrderProof [EQUIVALENT, 2985 ms] (451) QDP (452) DependencyGraphProof [EQUIVALENT, 0 ms] (453) AND (454) QDP (455) TransformationProof [EQUIVALENT, 0 ms] (456) QDP (457) TransformationProof [EQUIVALENT, 0 ms] (458) QDP (459) TransformationProof [SOUND, 0 ms] (460) QDP (461) DependencyGraphProof [EQUIVALENT, 0 ms] (462) TRUE (463) QDP (464) TransformationProof [EQUIVALENT, 0 ms] (465) QDP (466) TransformationProof [EQUIVALENT, 0 ms] (467) QDP (468) TransformationProof [SOUND, 0 ms] (469) QDP (470) DependencyGraphProof [EQUIVALENT, 0 ms] (471) TRUE (472) PiDP (473) UsableRulesProof [EQUIVALENT, 0 ms] (474) PiDP (475) PiDPToQDPProof [SOUND, 8 ms] (476) QDP (477) TransformationProof [EQUIVALENT, 0 ms] (478) QDP (479) TransformationProof [EQUIVALENT, 20 ms] (480) QDP (481) TransformationProof [EQUIVALENT, 4 ms] (482) QDP (483) TransformationProof [EQUIVALENT, 24 ms] (484) QDP (485) TransformationProof [EQUIVALENT, 22 ms] (486) QDP (487) TransformationProof [EQUIVALENT, 15 ms] (488) QDP (489) TransformationProof [EQUIVALENT, 30 ms] (490) QDP (491) TransformationProof [EQUIVALENT, 43 ms] (492) QDP (493) TransformationProof [EQUIVALENT, 66 ms] (494) QDP (495) TransformationProof [EQUIVALENT, 0 ms] (496) QDP (497) TransformationProof [EQUIVALENT, 0 ms] (498) QDP (499) TransformationProof [EQUIVALENT, 0 ms] (500) QDP (501) TransformationProof [EQUIVALENT, 0 ms] (502) QDP (503) TransformationProof [EQUIVALENT, 0 ms] (504) QDP (505) TransformationProof [EQUIVALENT, 0 ms] (506) QDP (507) TransformationProof [EQUIVALENT, 0 ms] (508) QDP (509) TransformationProof [EQUIVALENT, 0 ms] (510) QDP (511) TransformationProof [EQUIVALENT, 0 ms] (512) QDP (513) TransformationProof [SOUND, 0 ms] (514) QDP (515) TransformationProof [EQUIVALENT, 59 ms] (516) QDP (517) TransformationProof [EQUIVALENT, 93 ms] (518) QDP (519) TransformationProof [EQUIVALENT, 96 ms] (520) QDP (521) TransformationProof [EQUIVALENT, 96 ms] (522) QDP (523) TransformationProof [EQUIVALENT, 78 ms] (524) QDP (525) TransformationProof [EQUIVALENT, 110 ms] (526) QDP (527) TransformationProof [SOUND, 0 ms] (528) QDP (529) TransformationProof [EQUIVALENT, 64 ms] (530) QDP (531) TransformationProof [EQUIVALENT, 90 ms] (532) QDP (533) TransformationProof [EQUIVALENT, 62 ms] (534) QDP (535) TransformationProof [EQUIVALENT, 107 ms] (536) QDP (537) TransformationProof [EQUIVALENT, 76 ms] (538) QDP (539) TransformationProof [EQUIVALENT, 113 ms] (540) QDP (541) TransformationProof [EQUIVALENT, 96 ms] (542) QDP (543) TransformationProof [EQUIVALENT, 117 ms] (544) QDP (545) TransformationProof [EQUIVALENT, 97 ms] (546) QDP (547) TransformationProof [EQUIVALENT, 115 ms] (548) QDP (549) TransformationProof [EQUIVALENT, 94 ms] (550) QDP (551) TransformationProof [SOUND, 0 ms] (552) QDP (553) TransformationProof [EQUIVALENT, 65 ms] (554) QDP (555) TransformationProof [EQUIVALENT, 63 ms] (556) QDP (557) TransformationProof [EQUIVALENT, 48 ms] (558) QDP (559) TransformationProof [EQUIVALENT, 107 ms] (560) QDP (561) TransformationProof [EQUIVALENT, 70 ms] (562) QDP (563) TransformationProof [EQUIVALENT, 121 ms] (564) QDP (565) TransformationProof [EQUIVALENT, 115 ms] (566) QDP (567) TransformationProof [EQUIVALENT, 91 ms] (568) QDP (569) TransformationProof [EQUIVALENT, 120 ms] (570) QDP (571) TransformationProof [EQUIVALENT, 121 ms] (572) QDP (573) TransformationProof [EQUIVALENT, 116 ms] (574) QDP (575) TransformationProof [SOUND, 0 ms] (576) QDP (577) TransformationProof [EQUIVALENT, 112 ms] (578) QDP (579) TransformationProof [EQUIVALENT, 76 ms] (580) QDP (581) TransformationProof [EQUIVALENT, 112 ms] (582) QDP (583) TransformationProof [EQUIVALENT, 88 ms] (584) QDP (585) TransformationProof [EQUIVALENT, 72 ms] (586) QDP (587) TransformationProof [EQUIVALENT, 122 ms] (588) QDP (589) TransformationProof [SOUND, 0 ms] (590) QDP (591) TransformationProof [EQUIVALENT, 69 ms] (592) QDP (593) TransformationProof [EQUIVALENT, 41 ms] (594) QDP (595) TransformationProof [EQUIVALENT, 86 ms] (596) QDP (597) TransformationProof [EQUIVALENT, 125 ms] (598) QDP (599) TransformationProof [EQUIVALENT, 110 ms] (600) QDP (601) TransformationProof [EQUIVALENT, 125 ms] (602) QDP (603) TransformationProof [EQUIVALENT, 128 ms] (604) QDP (605) TransformationProof [EQUIVALENT, 101 ms] (606) QDP (607) TransformationProof [EQUIVALENT, 99 ms] (608) QDP (609) TransformationProof [EQUIVALENT, 68 ms] (610) QDP (611) TransformationProof [EQUIVALENT, 86 ms] (612) QDP (613) TransformationProof [SOUND, 0 ms] (614) QDP (615) TransformationProof [EQUIVALENT, 65 ms] (616) QDP (617) TransformationProof [EQUIVALENT, 55 ms] (618) QDP (619) TransformationProof [EQUIVALENT, 84 ms] (620) QDP (621) TransformationProof [EQUIVALENT, 97 ms] (622) QDP (623) TransformationProof [EQUIVALENT, 119 ms] (624) QDP (625) TransformationProof [EQUIVALENT, 131 ms] (626) QDP (627) TransformationProof [EQUIVALENT, 101 ms] (628) QDP (629) TransformationProof [EQUIVALENT, 95 ms] (630) QDP (631) TransformationProof [EQUIVALENT, 119 ms] (632) QDP (633) TransformationProof [EQUIVALENT, 94 ms] (634) QDP (635) TransformationProof [EQUIVALENT, 116 ms] (636) QDP (637) TransformationProof [SOUND, 0 ms] (638) QDP (639) TransformationProof [EQUIVALENT, 124 ms] (640) QDP (641) TransformationProof [EQUIVALENT, 75 ms] (642) QDP (643) TransformationProof [EQUIVALENT, 120 ms] (644) QDP (645) TransformationProof [EQUIVALENT, 89 ms] (646) QDP (647) TransformationProof [EQUIVALENT, 98 ms] (648) QDP (649) TransformationProof [EQUIVALENT, 100 ms] (650) QDP (651) TransformationProof [SOUND, 0 ms] (652) QDP (653) TransformationProof [EQUIVALENT, 99 ms] (654) QDP (655) TransformationProof [EQUIVALENT, 89 ms] (656) QDP (657) TransformationProof [EQUIVALENT, 55 ms] (658) QDP (659) TransformationProof [EQUIVALENT, 98 ms] (660) QDP (661) TransformationProof [EQUIVALENT, 109 ms] (662) QDP (663) TransformationProof [EQUIVALENT, 78 ms] (664) QDP (665) TransformationProof [EQUIVALENT, 92 ms] (666) QDP (667) TransformationProof [EQUIVALENT, 108 ms] (668) QDP (669) TransformationProof [EQUIVALENT, 95 ms] (670) QDP (671) TransformationProof [EQUIVALENT, 109 ms] (672) QDP (673) TransformationProof [EQUIVALENT, 75 ms] (674) QDP (675) TransformationProof [SOUND, 0 ms] (676) QDP (677) TransformationProof [EQUIVALENT, 114 ms] (678) QDP (679) TransformationProof [EQUIVALENT, 88 ms] (680) QDP (681) TransformationProof [EQUIVALENT, 76 ms] (682) QDP (683) TransformationProof [EQUIVALENT, 103 ms] (684) QDP (685) TransformationProof [EQUIVALENT, 46 ms] (686) QDP (687) TransformationProof [EQUIVALENT, 108 ms] (688) QDP (689) TransformationProof [EQUIVALENT, 83 ms] (690) QDP (691) TransformationProof [EQUIVALENT, 127 ms] (692) QDP (693) TransformationProof [EQUIVALENT, 98 ms] (694) QDP (695) TransformationProof [EQUIVALENT, 109 ms] (696) QDP (697) TransformationProof [EQUIVALENT, 113 ms] (698) QDP (699) TransformationProof [SOUND, 0 ms] (700) QDP (701) DependencyGraphProof [EQUIVALENT, 0 ms] (702) QDP (703) TransformationProof [SOUND, 0 ms] (704) QDP (705) DependencyGraphProof [EQUIVALENT, 0 ms] (706) QDP (707) TransformationProof [SOUND, 0 ms] (708) QDP (709) DependencyGraphProof [EQUIVALENT, 0 ms] (710) QDP (711) TransformationProof [EQUIVALENT, 0 ms] (712) QDP (713) TransformationProof [EQUIVALENT, 0 ms] (714) QDP (715) TransformationProof [EQUIVALENT, 0 ms] (716) QDP (717) TransformationProof [EQUIVALENT, 0 ms] (718) QDP (719) TransformationProof [EQUIVALENT, 0 ms] (720) QDP (721) TransformationProof [EQUIVALENT, 0 ms] (722) QDP (723) TransformationProof [EQUIVALENT, 0 ms] (724) QDP (725) TransformationProof [EQUIVALENT, 0 ms] (726) QDP (727) TransformationProof [EQUIVALENT, 0 ms] (728) QDP (729) TransformationProof [EQUIVALENT, 0 ms] (730) QDP (731) TransformationProof [EQUIVALENT, 0 ms] (732) QDP (733) TransformationProof [EQUIVALENT, 0 ms] (734) QDP (735) TransformationProof [EQUIVALENT, 0 ms] (736) QDP (737) TransformationProof [EQUIVALENT, 0 ms] (738) QDP (739) TransformationProof [EQUIVALENT, 0 ms] (740) QDP (741) TransformationProof [EQUIVALENT, 0 ms] (742) QDP (743) TransformationProof [EQUIVALENT, 0 ms] (744) QDP (745) TransformationProof [EQUIVALENT, 0 ms] (746) QDP (747) TransformationProof [EQUIVALENT, 72 ms] (748) QDP (749) TransformationProof [EQUIVALENT, 109 ms] (750) QDP (751) TransformationProof [EQUIVALENT, 43 ms] (752) QDP (753) TransformationProof [EQUIVALENT, 100 ms] (754) QDP (755) TransformationProof [EQUIVALENT, 0 ms] (756) QDP (757) TransformationProof [EQUIVALENT, 0 ms] (758) QDP (759) TransformationProof [EQUIVALENT, 0 ms] (760) QDP (761) TransformationProof [EQUIVALENT, 0 ms] (762) QDP (763) TransformationProof [EQUIVALENT, 0 ms] (764) QDP (765) TransformationProof [EQUIVALENT, 0 ms] (766) QDP (767) TransformationProof [EQUIVALENT, 0 ms] (768) QDP (769) TransformationProof [EQUIVALENT, 0 ms] (770) QDP (771) TransformationProof [EQUIVALENT, 47 ms] (772) QDP (773) TransformationProof [EQUIVALENT, 40 ms] (774) QDP (775) TransformationProof [EQUIVALENT, 110 ms] (776) QDP (777) TransformationProof [EQUIVALENT, 72 ms] (778) QDP (779) QDPOrderProof [EQUIVALENT, 408 ms] (780) QDP (781) DependencyGraphProof [EQUIVALENT, 0 ms] (782) QDP (783) TransformationProof [EQUIVALENT, 0 ms] (784) QDP (785) TransformationProof [EQUIVALENT, 0 ms] (786) QDP (787) TransformationProof [SOUND, 0 ms] (788) QDP (789) DependencyGraphProof [EQUIVALENT, 0 ms] (790) TRUE (791) PiDP (792) PiDPToQDPProof [SOUND, 0 ms] (793) QDP (794) TransformationProof [EQUIVALENT, 10 ms] (795) QDP (796) TransformationProof [EQUIVALENT, 0 ms] (797) QDP (798) TransformationProof [EQUIVALENT, 0 ms] (799) QDP (800) TransformationProof [EQUIVALENT, 0 ms] (801) QDP (802) TransformationProof [EQUIVALENT, 0 ms] (803) QDP (804) TransformationProof [EQUIVALENT, 0 ms] (805) QDP (806) TransformationProof [SOUND, 0 ms] (807) QDP (808) TransformationProof [EQUIVALENT, 9 ms] (809) QDP (810) TransformationProof [EQUIVALENT, 0 ms] (811) QDP (812) TransformationProof [EQUIVALENT, 56 ms] (813) QDP (814) TransformationProof [EQUIVALENT, 35 ms] (815) QDP (816) TransformationProof [EQUIVALENT, 9 ms] (817) QDP (818) TransformationProof [EQUIVALENT, 41 ms] (819) QDP (820) TransformationProof [SOUND, 0 ms] (821) QDP (822) TransformationProof [EQUIVALENT, 0 ms] (823) QDP (824) TransformationProof [EQUIVALENT, 8 ms] (825) QDP (826) TransformationProof [EQUIVALENT, 20 ms] (827) QDP (828) TransformationProof [EQUIVALENT, 38 ms] (829) QDP (830) TransformationProof [EQUIVALENT, 34 ms] (831) QDP (832) TransformationProof [EQUIVALENT, 28 ms] (833) QDP (834) TransformationProof [EQUIVALENT, 16 ms] (835) QDP (836) TransformationProof [EQUIVALENT, 55 ms] (837) QDP (838) TransformationProof [EQUIVALENT, 21 ms] (839) QDP (840) TransformationProof [EQUIVALENT, 42 ms] (841) QDP (842) TransformationProof [EQUIVALENT, 35 ms] (843) QDP (844) TransformationProof [SOUND, 0 ms] (845) QDP (846) TransformationProof [EQUIVALENT, 0 ms] (847) QDP (848) TransformationProof [EQUIVALENT, 7 ms] (849) QDP (850) TransformationProof [EQUIVALENT, 0 ms] (851) QDP (852) TransformationProof [EQUIVALENT, 20 ms] (853) QDP (854) TransformationProof [EQUIVALENT, 55 ms] (855) QDP (856) TransformationProof [EQUIVALENT, 33 ms] (857) QDP (858) TransformationProof [EQUIVALENT, 57 ms] (859) QDP (860) TransformationProof [EQUIVALENT, 40 ms] (861) QDP (862) TransformationProof [EQUIVALENT, 37 ms] (863) QDP (864) TransformationProof [EQUIVALENT, 0 ms] (865) QDP (866) TransformationProof [EQUIVALENT, 65 ms] (867) QDP (868) TransformationProof [SOUND, 0 ms] (869) QDP (870) DependencyGraphProof [EQUIVALENT, 0 ms] (871) QDP (872) TransformationProof [EQUIVALENT, 0 ms] (873) QDP (874) TransformationProof [EQUIVALENT, 0 ms] (875) QDP (876) TransformationProof [EQUIVALENT, 0 ms] (877) QDP (878) TransformationProof [EQUIVALENT, 0 ms] (879) QDP (880) TransformationProof [EQUIVALENT, 0 ms] (881) QDP (882) TransformationProof [EQUIVALENT, 0 ms] (883) QDP (884) TransformationProof [EQUIVALENT, 0 ms] (885) QDP (886) TransformationProof [EQUIVALENT, 0 ms] (887) QDP (888) TransformationProof [EQUIVALENT, 0 ms] (889) QDP (890) TransformationProof [EQUIVALENT, 0 ms] (891) QDP (892) TransformationProof [EQUIVALENT, 44 ms] (893) QDP (894) TransformationProof [EQUIVALENT, 40 ms] (895) QDP (896) TransformationProof [EQUIVALENT, 22 ms] (897) QDP (898) TransformationProof [EQUIVALENT, 54 ms] (899) QDP (900) QDPOrderProof [EQUIVALENT, 207 ms] (901) QDP (902) DependencyGraphProof [EQUIVALENT, 0 ms] (903) TRUE ---------------------------------------- (0) Obligation: Clauses: move(1, X, Y, X1) :- ','(write('Move top disk from '), ','(write(X), ','(write(' to '), ','(write(Y), nl)))). move(N, X, Y, Z) :- ','(>(N, 1), ','(is(M, -(N, 1)), ','(move(M, X, Z, Y), ','(move(1, X, Y, X2), move(M, Z, Y, X))))). Query: move(g,g,g,g) ---------------------------------------- (1) IntegerArithmeticTransformerProof (SOUND) Added definitions of predefined predicates [PROLOG]. ---------------------------------------- (2) Obligation: Clauses: move(succ(zero), X, Y, X1) :- ','(write('Move top disk from '), ','(write(X), ','(write(' to '), ','(write(Y), nl)))). move(N, X, Y, Z) :- ','(=(X1, N), ','(=(X3, succ(zero)), ','(isGreater(X1, X3), ','(isMinus(N, succ(zero), U), ','(=(M, U), ','(move(M, X, Z, Y), ','(move(succ(zero), X, Y, X2), move(M, Z, Y, X)))))))). isPlus(zero, X, X). isPlus(succ(X), zero, succ(X)). isPlus(succ(X), succ(Y), succ(succ(Z))) :- isPlus(X, Y, Z). isPlus(succ(X), pred(Y), Z) :- isPlus(X, Y, Z). isPlus(pred(X), zero, pred(X)). isPlus(pred(X), succ(Y), Z) :- isPlus(X, Y, Z). isPlus(pred(X), pred(Y), pred(pred(Z))) :- isPlus(X, Y, Z). isMinus(X, zero, X). isMinus(zero, succ(Y), pred(Z)) :- isMinus(zero, Y, Z). isMinus(zero, pred(Y), succ(Z)) :- isMinus(zero, Y, Z). isMinus(succ(X), succ(Y), Z) :- isMinus(X, Y, Z). isMinus(succ(X), pred(Y), succ(succ(Z))) :- isMinus(X, Y, Z). isMinus(pred(X), succ(Y), pred(pred(Z))) :- isMinus(X, Y, Z). isMinus(pred(X), pred(Y), Z) :- isMinus(X, Y, Z). isTimes(X, zero, zero). isTimes(zero, succ(Y), zero). isTimes(zero, pred(Y), zero). isTimes(succ(X), succ(Y), Z) :- ','(isTimes(succ(X), Y, A), isPlus(A, succ(X), Z)). isTimes(succ(X), pred(Y), Z) :- ','(isTimes(succ(X), Y, A), isMinus(A, succ(X), Z)). isTimes(pred(X), succ(Y), Z) :- ','(isTimes(pred(X), Y, A), isPlus(A, pred(X), Z)). isTimes(pred(X), pred(Y), Z) :- ','(isTimes(pred(X), Y, A), isMinus(A, pred(X), Z)). isDiv(zero, succ(Y), zero). isDiv(zero, pred(Y), zero). isDiv(succ(X), succ(Y), zero) :- isMinus(succ(X), succ(Y), pred(Z)). isDiv(succ(X), succ(Y), succ(Z)) :- ','(isMinus(succ(X), succ(Y), A), isDiv(A, succ(Y), Z)). isDiv(succ(X), pred(Y), Z) :- ','(isMinus(zero, pred(Y), A), ','(isDiv(succ(X), A, B), isMinus(zero, B, Z))). isDiv(pred(X), pred(Y), zero) :- isMinus(pred(X), pred(Y), succ(Z)). isDiv(pred(X), pred(Y), succ(Z)) :- ','(isMinus(pred(X), pred(Y), A), isDiv(A, pred(Y), Z)). isDiv(pred(X), succ(Y), Z) :- ','(isMinus(zero, pred(X), A), ','(isDiv(A, succ(Y), B), isMinus(zero, B, Z))). isModulo(X, Y, Z) :- ','(isDiv(X, Y, A), ','(isTimes(A, Y, B), isMinus(X, B, Z))). isGreater(succ(X), zero). isGreater(succ(X), pred(Y)). isGreater(succ(X), succ(Y)) :- isGreater(X, Y). isGreater(zero, pred(Y)). isGreater(pred(X), pred(Y)) :- isGreater(X, Y). Query: move(g,g,g,g) ---------------------------------------- (3) UnifyTransformerProof (EQUIVALENT) Added a fact for the built-in = predicate [PROLOG]. ---------------------------------------- (4) Obligation: Clauses: move(succ(zero), X, Y, X1) :- ','(write('Move top disk from '), ','(write(X), ','(write(' to '), ','(write(Y), nl)))). move(N, X, Y, Z) :- ','(=(X1, N), ','(=(X3, succ(zero)), ','(isGreater(X1, X3), ','(isMinus(N, succ(zero), U), ','(=(M, U), ','(move(M, X, Z, Y), ','(move(succ(zero), X, Y, X2), move(M, Z, Y, X)))))))). isPlus(zero, X, X). isPlus(succ(X), zero, succ(X)). isPlus(succ(X), succ(Y), succ(succ(Z))) :- isPlus(X, Y, Z). isPlus(succ(X), pred(Y), Z) :- isPlus(X, Y, Z). isPlus(pred(X), zero, pred(X)). isPlus(pred(X), succ(Y), Z) :- isPlus(X, Y, Z). isPlus(pred(X), pred(Y), pred(pred(Z))) :- isPlus(X, Y, Z). isMinus(X, zero, X). isMinus(zero, succ(Y), pred(Z)) :- isMinus(zero, Y, Z). isMinus(zero, pred(Y), succ(Z)) :- isMinus(zero, Y, Z). isMinus(succ(X), succ(Y), Z) :- isMinus(X, Y, Z). isMinus(succ(X), pred(Y), succ(succ(Z))) :- isMinus(X, Y, Z). isMinus(pred(X), succ(Y), pred(pred(Z))) :- isMinus(X, Y, Z). isMinus(pred(X), pred(Y), Z) :- isMinus(X, Y, Z). isTimes(X, zero, zero). isTimes(zero, succ(Y), zero). isTimes(zero, pred(Y), zero). isTimes(succ(X), succ(Y), Z) :- ','(isTimes(succ(X), Y, A), isPlus(A, succ(X), Z)). isTimes(succ(X), pred(Y), Z) :- ','(isTimes(succ(X), Y, A), isMinus(A, succ(X), Z)). isTimes(pred(X), succ(Y), Z) :- ','(isTimes(pred(X), Y, A), isPlus(A, pred(X), Z)). isTimes(pred(X), pred(Y), Z) :- ','(isTimes(pred(X), Y, A), isMinus(A, pred(X), Z)). isDiv(zero, succ(Y), zero). isDiv(zero, pred(Y), zero). isDiv(succ(X), succ(Y), zero) :- isMinus(succ(X), succ(Y), pred(Z)). isDiv(succ(X), succ(Y), succ(Z)) :- ','(isMinus(succ(X), succ(Y), A), isDiv(A, succ(Y), Z)). isDiv(succ(X), pred(Y), Z) :- ','(isMinus(zero, pred(Y), A), ','(isDiv(succ(X), A, B), isMinus(zero, B, Z))). isDiv(pred(X), pred(Y), zero) :- isMinus(pred(X), pred(Y), succ(Z)). isDiv(pred(X), pred(Y), succ(Z)) :- ','(isMinus(pred(X), pred(Y), A), isDiv(A, pred(Y), Z)). isDiv(pred(X), succ(Y), Z) :- ','(isMinus(zero, pred(X), A), ','(isDiv(A, succ(Y), B), isMinus(zero, B, Z))). isModulo(X, Y, Z) :- ','(isDiv(X, Y, A), ','(isTimes(A, Y, B), isMinus(X, B, Z))). isGreater(succ(X), zero). isGreater(succ(X), pred(Y)). isGreater(succ(X), succ(Y)) :- isGreater(X, Y). isGreater(zero, pred(Y)). isGreater(pred(X), pred(Y)) :- isGreater(X, Y). =(X, X). Query: move(g,g,g,g) ---------------------------------------- (5) UndefinedPredicateHandlerProof (SOUND) Added facts for all undefined predicates [PROLOG]. ---------------------------------------- (6) Obligation: Clauses: move(succ(zero), X, Y, X1) :- ','(write('Move top disk from '), ','(write(X), ','(write(' to '), ','(write(Y), nl)))). move(N, X, Y, Z) :- ','(=(X1, N), ','(=(X3, succ(zero)), ','(isGreater(X1, X3), ','(isMinus(N, succ(zero), U), ','(=(M, U), ','(move(M, X, Z, Y), ','(move(succ(zero), X, Y, X2), move(M, Z, Y, X)))))))). isPlus(zero, X, X). isPlus(succ(X), zero, succ(X)). isPlus(succ(X), succ(Y), succ(succ(Z))) :- isPlus(X, Y, Z). isPlus(succ(X), pred(Y), Z) :- isPlus(X, Y, Z). isPlus(pred(X), zero, pred(X)). isPlus(pred(X), succ(Y), Z) :- isPlus(X, Y, Z). isPlus(pred(X), pred(Y), pred(pred(Z))) :- isPlus(X, Y, Z). isMinus(X, zero, X). isMinus(zero, succ(Y), pred(Z)) :- isMinus(zero, Y, Z). isMinus(zero, pred(Y), succ(Z)) :- isMinus(zero, Y, Z). isMinus(succ(X), succ(Y), Z) :- isMinus(X, Y, Z). isMinus(succ(X), pred(Y), succ(succ(Z))) :- isMinus(X, Y, Z). isMinus(pred(X), succ(Y), pred(pred(Z))) :- isMinus(X, Y, Z). isMinus(pred(X), pred(Y), Z) :- isMinus(X, Y, Z). isTimes(X, zero, zero). isTimes(zero, succ(Y), zero). isTimes(zero, pred(Y), zero). isTimes(succ(X), succ(Y), Z) :- ','(isTimes(succ(X), Y, A), isPlus(A, succ(X), Z)). isTimes(succ(X), pred(Y), Z) :- ','(isTimes(succ(X), Y, A), isMinus(A, succ(X), Z)). isTimes(pred(X), succ(Y), Z) :- ','(isTimes(pred(X), Y, A), isPlus(A, pred(X), Z)). isTimes(pred(X), pred(Y), Z) :- ','(isTimes(pred(X), Y, A), isMinus(A, pred(X), Z)). isDiv(zero, succ(Y), zero). isDiv(zero, pred(Y), zero). isDiv(succ(X), succ(Y), zero) :- isMinus(succ(X), succ(Y), pred(Z)). isDiv(succ(X), succ(Y), succ(Z)) :- ','(isMinus(succ(X), succ(Y), A), isDiv(A, succ(Y), Z)). isDiv(succ(X), pred(Y), Z) :- ','(isMinus(zero, pred(Y), A), ','(isDiv(succ(X), A, B), isMinus(zero, B, Z))). isDiv(pred(X), pred(Y), zero) :- isMinus(pred(X), pred(Y), succ(Z)). isDiv(pred(X), pred(Y), succ(Z)) :- ','(isMinus(pred(X), pred(Y), A), isDiv(A, pred(Y), Z)). isDiv(pred(X), succ(Y), Z) :- ','(isMinus(zero, pred(X), A), ','(isDiv(A, succ(Y), B), isMinus(zero, B, Z))). isModulo(X, Y, Z) :- ','(isDiv(X, Y, A), ','(isTimes(A, Y, B), isMinus(X, B, Z))). isGreater(succ(X), zero). isGreater(succ(X), pred(Y)). isGreater(succ(X), succ(Y)) :- isGreater(X, Y). isGreater(zero, pred(Y)). isGreater(pred(X), pred(Y)) :- isGreater(X, Y). =(X, X). write(X0). nl. Query: move(g,g,g,g) ---------------------------------------- (7) PrologToPiTRSProof (SOUND) We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: move_in_4: (b,b,b,b) (b,b,b,f) (b,b,f,b) (b,b,f,f) (b,f,f,b) (b,f,b,f) (b,f,f,f) (b,f,b,b) isGreater_in_2: (b,b) isMinus_in_3: (b,b,f) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, X1, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g(X0) U1_gggg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gggg(X, Y, X1, write_in_g(X)) U2_gggg(X, Y, X1, write_out_g(X)) -> U3_gggg(X, Y, X1, write_in_g(' to ')) U3_gggg(X, Y, X1, write_out_g(' to ')) -> U4_gggg(X, Y, X1, write_in_g(Y)) U4_gggg(X, Y, X1, write_out_g(Y)) -> U5_gggg(X, Y, X1, nl_in_) nl_in_ -> nl_out_ U5_gggg(X, Y, X1, nl_out_) -> move_out_gggg(succ(zero), X, Y, X1) move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(X1, N)) =_in_ag(X, X) -> =_out_ag(X, X) U6_gggg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gggg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg(succ(X), zero) isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg(succ(X), pred(Y)) isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(X, Y, isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg(zero, pred(Y)) isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(X, Y, isGreater_in_gg(X, Y)) U48_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U47_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U8_gggg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gggg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) isMinus_in_gga(X, zero, X) -> isMinus_out_gga(X, zero, X) isMinus_in_gga(zero, succ(Y), pred(Z)) -> U18_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(zero, pred(Y), succ(Z)) -> U19_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), succ(Y), Z) -> U20_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(succ(X), pred(Y), succ(succ(Z))) -> U21_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), succ(Y), pred(pred(Z))) -> U22_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), pred(Y), Z) -> U23_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) U23_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), pred(Y), Z) U22_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), succ(Y), pred(pred(Z))) U21_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), pred(Y), succ(succ(Z))) U20_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), succ(Y), Z) U19_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, pred(Y), succ(Z)) U18_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, succ(Y), pred(Z)) U9_gggg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gggg(N, X, Y, Z, =_in_ag(M, U)) U10_gggg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gggg(N, X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> U12_gggg(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) move_in_ggga(succ(zero), X, Y, X1) -> U1_ggga(X, Y, X1, write_in_g('Move top disk from ')) U1_ggga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggga(X, Y, X1, write_in_g(X)) U2_ggga(X, Y, X1, write_out_g(X)) -> U3_ggga(X, Y, X1, write_in_g(' to ')) U3_ggga(X, Y, X1, write_out_g(' to ')) -> U4_ggga(X, Y, X1, write_in_g(Y)) U4_ggga(X, Y, X1, write_out_g(Y)) -> U5_ggga(X, Y, X1, nl_in_) U5_ggga(X, Y, X1, nl_out_) -> move_out_ggga(succ(zero), X, Y, X1) move_in_ggga(N, X, Y, Z) -> U6_ggga(N, X, Y, Z, =_in_ag(X1, N)) U6_ggga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggga(N, X, Y, Z, =_in_ag(M, U)) U10_ggga(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggga(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) move_in_ggag(succ(zero), X, Y, X1) -> U1_ggag(X, Y, X1, write_in_g('Move top disk from ')) U1_ggag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggag(X, Y, X1, write_in_g(X)) U2_ggag(X, Y, X1, write_out_g(X)) -> U3_ggag(X, Y, X1, write_in_g(' to ')) U3_ggag(X, Y, X1, write_out_g(' to ')) -> U4_ggag(X, Y, X1, write_in_a(Y)) write_in_a(X0) -> write_out_a(X0) U4_ggag(X, Y, X1, write_out_a(Y)) -> U5_ggag(X, Y, X1, nl_in_) U5_ggag(X, Y, X1, nl_out_) -> move_out_ggag(succ(zero), X, Y, X1) move_in_ggag(N, X, Y, Z) -> U6_ggag(N, X, Y, Z, =_in_ag(X1, N)) U6_ggag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggag(N, X, Y, Z, =_in_ag(M, U)) U10_ggag(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggag(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U11_ggag(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_ggag(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) move_in_ggaa(succ(zero), X, Y, X1) -> U1_ggaa(X, Y, X1, write_in_g('Move top disk from ')) U1_ggaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggaa(X, Y, X1, write_in_g(X)) U2_ggaa(X, Y, X1, write_out_g(X)) -> U3_ggaa(X, Y, X1, write_in_g(' to ')) U3_ggaa(X, Y, X1, write_out_g(' to ')) -> U4_ggaa(X, Y, X1, write_in_a(Y)) U4_ggaa(X, Y, X1, write_out_a(Y)) -> U5_ggaa(X, Y, X1, nl_in_) U5_ggaa(X, Y, X1, nl_out_) -> move_out_ggaa(succ(zero), X, Y, X1) move_in_ggaa(N, X, Y, Z) -> U6_ggaa(N, X, Y, Z, =_in_ag(X1, N)) U6_ggaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggaa(N, X, Y, Z, =_in_ag(M, U)) U10_ggaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggaa(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U11_ggaa(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_ggaa(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_ggaa(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggaa(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) move_in_gaag(succ(zero), X, Y, X1) -> U1_gaag(X, Y, X1, write_in_g('Move top disk from ')) U1_gaag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaag(X, Y, X1, write_in_a(X)) U2_gaag(X, Y, X1, write_out_a(X)) -> U3_gaag(X, Y, X1, write_in_g(' to ')) U3_gaag(X, Y, X1, write_out_g(' to ')) -> U4_gaag(X, Y, X1, write_in_a(Y)) U4_gaag(X, Y, X1, write_out_a(Y)) -> U5_gaag(X, Y, X1, nl_in_) U5_gaag(X, Y, X1, nl_out_) -> move_out_gaag(succ(zero), X, Y, X1) move_in_gaag(N, X, Y, Z) -> U6_gaag(N, X, Y, Z, =_in_ag(X1, N)) U6_gaag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaag(N, X, Y, Z, =_in_ag(M, U)) U10_gaag(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaag(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) move_in_gaga(succ(zero), X, Y, X1) -> U1_gaga(X, Y, X1, write_in_g('Move top disk from ')) U1_gaga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaga(X, Y, X1, write_in_a(X)) U2_gaga(X, Y, X1, write_out_a(X)) -> U3_gaga(X, Y, X1, write_in_g(' to ')) U3_gaga(X, Y, X1, write_out_g(' to ')) -> U4_gaga(X, Y, X1, write_in_g(Y)) U4_gaga(X, Y, X1, write_out_g(Y)) -> U5_gaga(X, Y, X1, nl_in_) U5_gaga(X, Y, X1, nl_out_) -> move_out_gaga(succ(zero), X, Y, X1) move_in_gaga(N, X, Y, Z) -> U6_gaga(N, X, Y, Z, =_in_ag(X1, N)) U6_gaga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaga(N, X, Y, Z, =_in_ag(M, U)) U10_gaga(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaga(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U11_gaga(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_gaga(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gaga(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gaga(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U13_gaga(N, X, Y, Z, move_out_gaga(M, Z, Y, X)) -> move_out_gaga(N, X, Y, Z) U11_gaag(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_gaag(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) move_in_gaaa(succ(zero), X, Y, X1) -> U1_gaaa(X, Y, X1, write_in_g('Move top disk from ')) U1_gaaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaaa(X, Y, X1, write_in_a(X)) U2_gaaa(X, Y, X1, write_out_a(X)) -> U3_gaaa(X, Y, X1, write_in_g(' to ')) U3_gaaa(X, Y, X1, write_out_g(' to ')) -> U4_gaaa(X, Y, X1, write_in_a(Y)) U4_gaaa(X, Y, X1, write_out_a(Y)) -> U5_gaaa(X, Y, X1, nl_in_) U5_gaaa(X, Y, X1, nl_out_) -> move_out_gaaa(succ(zero), X, Y, X1) move_in_gaaa(N, X, Y, Z) -> U6_gaaa(N, X, Y, Z, =_in_ag(X1, N)) U6_gaaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaaa(N, X, Y, Z, =_in_ag(M, U)) U10_gaaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaaa(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U11_gaaa(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_gaaa(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_gaaa(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaaa(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U13_gaaa(N, X, Y, Z, move_out_gaaa(M, Z, Y, X)) -> move_out_gaaa(N, X, Y, Z) U12_gaag(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaag(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) U13_gaag(N, X, Y, Z, move_out_ggaa(M, Z, Y, X)) -> move_out_gaag(N, X, Y, Z) U13_ggaa(N, X, Y, Z, move_out_gaag(M, Z, Y, X)) -> move_out_ggaa(N, X, Y, Z) U12_ggag(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggag(N, X, Y, Z, move_in_ggag(M, Z, Y, X)) U13_ggag(N, X, Y, Z, move_out_ggag(M, Z, Y, X)) -> move_out_ggag(N, X, Y, Z) U11_ggga(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_ggga(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U12_ggga(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_ggga(N, X, Y, Z, move_in_gagg(M, Z, Y, X)) move_in_gagg(succ(zero), X, Y, X1) -> U1_gagg(X, Y, X1, write_in_g('Move top disk from ')) U1_gagg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gagg(X, Y, X1, write_in_a(X)) U2_gagg(X, Y, X1, write_out_a(X)) -> U3_gagg(X, Y, X1, write_in_g(' to ')) U3_gagg(X, Y, X1, write_out_g(' to ')) -> U4_gagg(X, Y, X1, write_in_g(Y)) U4_gagg(X, Y, X1, write_out_g(Y)) -> U5_gagg(X, Y, X1, nl_in_) U5_gagg(X, Y, X1, nl_out_) -> move_out_gagg(succ(zero), X, Y, X1) move_in_gagg(N, X, Y, Z) -> U6_gagg(N, X, Y, Z, =_in_ag(X1, N)) U6_gagg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gagg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gagg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gagg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gagg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gagg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gagg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gagg(N, X, Y, Z, =_in_ag(M, U)) U10_gagg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gagg(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U11_gagg(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_gagg(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gagg(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gagg(N, X, Y, Z, move_in_ggga(M, Z, Y, X)) U13_gagg(N, X, Y, Z, move_out_ggga(M, Z, Y, X)) -> move_out_gagg(N, X, Y, Z) U13_ggga(N, X, Y, Z, move_out_gagg(M, Z, Y, X)) -> move_out_ggga(N, X, Y, Z) U12_gggg(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_gggg(N, X, Y, Z, move_in_gggg(M, Z, Y, X)) U13_gggg(N, X, Y, Z, move_out_gggg(M, Z, Y, X)) -> move_out_gggg(N, X, Y, Z) The argument filtering Pi contains the following mapping: move_in_gggg(x1, x2, x3, x4) = move_in_gggg(x1, x2, x3, x4) succ(x1) = succ(x1) zero = zero U1_gggg(x1, x2, x3, x4) = U1_gggg(x1, x2, x4) write_in_g(x1) = write_in_g(x1) write_out_g(x1) = write_out_g 'Move top disk from ' = 'Move top disk from ' U2_gggg(x1, x2, x3, x4) = U2_gggg(x2, x4) U3_gggg(x1, x2, x3, x4) = U3_gggg(x2, x4) ' to ' = ' to ' U4_gggg(x1, x2, x3, x4) = U4_gggg(x4) U5_gggg(x1, x2, x3, x4) = U5_gggg(x4) nl_in_ = nl_in_ nl_out_ = nl_out_ move_out_gggg(x1, x2, x3, x4) = move_out_gggg U6_gggg(x1, x2, x3, x4, x5) = U6_gggg(x1, x2, x3, x4, x5) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U7_gggg(x1, x2, x3, x4, x5, x6) = U7_gggg(x1, x2, x3, x4, x5, x6) U8_gggg(x1, x2, x3, x4, x5, x6, x7) = U8_gggg(x1, x2, x3, x4, x7) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U47_gg(x1, x2, x3) = U47_gg(x3) U48_gg(x1, x2, x3) = U48_gg(x3) U9_gggg(x1, x2, x3, x4, x5) = U9_gggg(x2, x3, x4, x5) isMinus_in_gga(x1, x2, x3) = isMinus_in_gga(x1, x2) isMinus_out_gga(x1, x2, x3) = isMinus_out_gga(x3) U18_gga(x1, x2, x3) = U18_gga(x3) U19_gga(x1, x2, x3) = U19_gga(x3) U20_gga(x1, x2, x3, x4) = U20_gga(x4) U21_gga(x1, x2, x3, x4) = U21_gga(x4) U22_gga(x1, x2, x3, x4) = U22_gga(x4) U23_gga(x1, x2, x3, x4) = U23_gga(x4) U10_gggg(x1, x2, x3, x4, x5) = U10_gggg(x2, x3, x4, x5) U11_gggg(x1, x2, x3, x4, x5, x6) = U11_gggg(x2, x3, x4, x5, x6) U12_gggg(x1, x2, x3, x4, x5, x6) = U12_gggg(x2, x3, x4, x5, x6) move_in_ggga(x1, x2, x3, x4) = move_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4) = U1_ggga(x1, x2, x4) U2_ggga(x1, x2, x3, x4) = U2_ggga(x2, x4) U3_ggga(x1, x2, x3, x4) = U3_ggga(x2, x4) U4_ggga(x1, x2, x3, x4) = U4_ggga(x4) U5_ggga(x1, x2, x3, x4) = U5_ggga(x4) move_out_ggga(x1, x2, x3, x4) = move_out_ggga U6_ggga(x1, x2, x3, x4, x5) = U6_ggga(x1, x2, x3, x5) U7_ggga(x1, x2, x3, x4, x5, x6) = U7_ggga(x1, x2, x3, x5, x6) U8_ggga(x1, x2, x3, x4, x5, x6, x7) = U8_ggga(x1, x2, x3, x7) U9_ggga(x1, x2, x3, x4, x5) = U9_ggga(x2, x3, x5) U10_ggga(x1, x2, x3, x4, x5) = U10_ggga(x2, x3, x5) U11_ggga(x1, x2, x3, x4, x5, x6) = U11_ggga(x2, x3, x5, x6) move_in_ggag(x1, x2, x3, x4) = move_in_ggag(x1, x2, x4) U1_ggag(x1, x2, x3, x4) = U1_ggag(x1, x4) U2_ggag(x1, x2, x3, x4) = U2_ggag(x4) U3_ggag(x1, x2, x3, x4) = U3_ggag(x4) U4_ggag(x1, x2, x3, x4) = U4_ggag(x4) write_in_a(x1) = write_in_a write_out_a(x1) = write_out_a U5_ggag(x1, x2, x3, x4) = U5_ggag(x4) move_out_ggag(x1, x2, x3, x4) = move_out_ggag U6_ggag(x1, x2, x3, x4, x5) = U6_ggag(x1, x2, x4, x5) U7_ggag(x1, x2, x3, x4, x5, x6) = U7_ggag(x1, x2, x4, x5, x6) U8_ggag(x1, x2, x3, x4, x5, x6, x7) = U8_ggag(x1, x2, x4, x7) U9_ggag(x1, x2, x3, x4, x5) = U9_ggag(x2, x4, x5) U10_ggag(x1, x2, x3, x4, x5) = U10_ggag(x2, x4, x5) U11_ggag(x1, x2, x3, x4, x5, x6) = U11_ggag(x2, x4, x5, x6) U12_ggag(x1, x2, x3, x4, x5, x6) = U12_ggag(x2, x4, x5, x6) move_in_ggaa(x1, x2, x3, x4) = move_in_ggaa(x1, x2) U1_ggaa(x1, x2, x3, x4) = U1_ggaa(x1, x4) U2_ggaa(x1, x2, x3, x4) = U2_ggaa(x4) U3_ggaa(x1, x2, x3, x4) = U3_ggaa(x4) U4_ggaa(x1, x2, x3, x4) = U4_ggaa(x4) U5_ggaa(x1, x2, x3, x4) = U5_ggaa(x4) move_out_ggaa(x1, x2, x3, x4) = move_out_ggaa U6_ggaa(x1, x2, x3, x4, x5) = U6_ggaa(x1, x2, x5) U7_ggaa(x1, x2, x3, x4, x5, x6) = U7_ggaa(x1, x2, x5, x6) U8_ggaa(x1, x2, x3, x4, x5, x6, x7) = U8_ggaa(x1, x2, x7) U9_ggaa(x1, x2, x3, x4, x5) = U9_ggaa(x2, x5) U10_ggaa(x1, x2, x3, x4, x5) = U10_ggaa(x2, x5) U11_ggaa(x1, x2, x3, x4, x5, x6) = U11_ggaa(x2, x5, x6) U12_ggaa(x1, x2, x3, x4, x5, x6) = U12_ggaa(x2, x5, x6) U13_ggaa(x1, x2, x3, x4, x5) = U13_ggaa(x5) move_in_gaag(x1, x2, x3, x4) = move_in_gaag(x1, x4) U1_gaag(x1, x2, x3, x4) = U1_gaag(x4) U2_gaag(x1, x2, x3, x4) = U2_gaag(x4) U3_gaag(x1, x2, x3, x4) = U3_gaag(x4) U4_gaag(x1, x2, x3, x4) = U4_gaag(x4) U5_gaag(x1, x2, x3, x4) = U5_gaag(x4) move_out_gaag(x1, x2, x3, x4) = move_out_gaag U6_gaag(x1, x2, x3, x4, x5) = U6_gaag(x1, x4, x5) U7_gaag(x1, x2, x3, x4, x5, x6) = U7_gaag(x1, x4, x5, x6) U8_gaag(x1, x2, x3, x4, x5, x6, x7) = U8_gaag(x1, x4, x7) U9_gaag(x1, x2, x3, x4, x5) = U9_gaag(x4, x5) U10_gaag(x1, x2, x3, x4, x5) = U10_gaag(x4, x5) U11_gaag(x1, x2, x3, x4, x5, x6) = U11_gaag(x4, x5, x6) move_in_gaga(x1, x2, x3, x4) = move_in_gaga(x1, x3) U1_gaga(x1, x2, x3, x4) = U1_gaga(x2, x4) U2_gaga(x1, x2, x3, x4) = U2_gaga(x2, x4) U3_gaga(x1, x2, x3, x4) = U3_gaga(x2, x4) U4_gaga(x1, x2, x3, x4) = U4_gaga(x4) U5_gaga(x1, x2, x3, x4) = U5_gaga(x4) move_out_gaga(x1, x2, x3, x4) = move_out_gaga U6_gaga(x1, x2, x3, x4, x5) = U6_gaga(x1, x3, x5) U7_gaga(x1, x2, x3, x4, x5, x6) = U7_gaga(x1, x3, x5, x6) U8_gaga(x1, x2, x3, x4, x5, x6, x7) = U8_gaga(x1, x3, x7) U9_gaga(x1, x2, x3, x4, x5) = U9_gaga(x3, x5) U10_gaga(x1, x2, x3, x4, x5) = U10_gaga(x3, x5) U11_gaga(x1, x2, x3, x4, x5, x6) = U11_gaga(x3, x5, x6) U12_gaga(x1, x2, x3, x4, x5, x6) = U12_gaga(x3, x5, x6) U13_gaga(x1, x2, x3, x4, x5) = U13_gaga(x5) U12_gaag(x1, x2, x3, x4, x5, x6) = U12_gaag(x4, x5, x6) move_in_gaaa(x1, x2, x3, x4) = move_in_gaaa(x1) U1_gaaa(x1, x2, x3, x4) = U1_gaaa(x4) U2_gaaa(x1, x2, x3, x4) = U2_gaaa(x4) U3_gaaa(x1, x2, x3, x4) = U3_gaaa(x4) U4_gaaa(x1, x2, x3, x4) = U4_gaaa(x4) U5_gaaa(x1, x2, x3, x4) = U5_gaaa(x4) move_out_gaaa(x1, x2, x3, x4) = move_out_gaaa U6_gaaa(x1, x2, x3, x4, x5) = U6_gaaa(x1, x5) U7_gaaa(x1, x2, x3, x4, x5, x6) = U7_gaaa(x1, x5, x6) U8_gaaa(x1, x2, x3, x4, x5, x6, x7) = U8_gaaa(x1, x7) U9_gaaa(x1, x2, x3, x4, x5) = U9_gaaa(x5) U10_gaaa(x1, x2, x3, x4, x5) = U10_gaaa(x5) U11_gaaa(x1, x2, x3, x4, x5, x6) = U11_gaaa(x5, x6) U12_gaaa(x1, x2, x3, x4, x5, x6) = U12_gaaa(x5, x6) U13_gaaa(x1, x2, x3, x4, x5) = U13_gaaa(x5) U13_gaag(x1, x2, x3, x4, x5) = U13_gaag(x5) U13_ggag(x1, x2, x3, x4, x5) = U13_ggag(x5) U12_ggga(x1, x2, x3, x4, x5, x6) = U12_ggga(x2, x3, x5, x6) U13_ggga(x1, x2, x3, x4, x5) = U13_ggga(x5) move_in_gagg(x1, x2, x3, x4) = move_in_gagg(x1, x3, x4) U1_gagg(x1, x2, x3, x4) = U1_gagg(x2, x4) U2_gagg(x1, x2, x3, x4) = U2_gagg(x2, x4) U3_gagg(x1, x2, x3, x4) = U3_gagg(x2, x4) U4_gagg(x1, x2, x3, x4) = U4_gagg(x4) U5_gagg(x1, x2, x3, x4) = U5_gagg(x4) move_out_gagg(x1, x2, x3, x4) = move_out_gagg U6_gagg(x1, x2, x3, x4, x5) = U6_gagg(x1, x3, x4, x5) U7_gagg(x1, x2, x3, x4, x5, x6) = U7_gagg(x1, x3, x4, x5, x6) U8_gagg(x1, x2, x3, x4, x5, x6, x7) = U8_gagg(x1, x3, x4, x7) U9_gagg(x1, x2, x3, x4, x5) = U9_gagg(x3, x4, x5) U10_gagg(x1, x2, x3, x4, x5) = U10_gagg(x3, x4, x5) U11_gagg(x1, x2, x3, x4, x5, x6) = U11_gagg(x3, x4, x5, x6) U12_gagg(x1, x2, x3, x4, x5, x6) = U12_gagg(x3, x4, x5, x6) U13_gagg(x1, x2, x3, x4, x5) = U13_gagg(x5) U13_gggg(x1, x2, x3, x4, x5) = U13_gggg(x5) Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog ---------------------------------------- (8) Obligation: Pi-finite rewrite system: The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, X1, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g(X0) U1_gggg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gggg(X, Y, X1, write_in_g(X)) U2_gggg(X, Y, X1, write_out_g(X)) -> U3_gggg(X, Y, X1, write_in_g(' to ')) U3_gggg(X, Y, X1, write_out_g(' to ')) -> U4_gggg(X, Y, X1, write_in_g(Y)) U4_gggg(X, Y, X1, write_out_g(Y)) -> U5_gggg(X, Y, X1, nl_in_) nl_in_ -> nl_out_ U5_gggg(X, Y, X1, nl_out_) -> move_out_gggg(succ(zero), X, Y, X1) move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(X1, N)) =_in_ag(X, X) -> =_out_ag(X, X) U6_gggg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gggg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg(succ(X), zero) isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg(succ(X), pred(Y)) isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(X, Y, isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg(zero, pred(Y)) isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(X, Y, isGreater_in_gg(X, Y)) U48_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U47_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U8_gggg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gggg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) isMinus_in_gga(X, zero, X) -> isMinus_out_gga(X, zero, X) isMinus_in_gga(zero, succ(Y), pred(Z)) -> U18_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(zero, pred(Y), succ(Z)) -> U19_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), succ(Y), Z) -> U20_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(succ(X), pred(Y), succ(succ(Z))) -> U21_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), succ(Y), pred(pred(Z))) -> U22_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), pred(Y), Z) -> U23_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) U23_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), pred(Y), Z) U22_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), succ(Y), pred(pred(Z))) U21_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), pred(Y), succ(succ(Z))) U20_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), succ(Y), Z) U19_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, pred(Y), succ(Z)) U18_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, succ(Y), pred(Z)) U9_gggg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gggg(N, X, Y, Z, =_in_ag(M, U)) U10_gggg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gggg(N, X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> U12_gggg(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) move_in_ggga(succ(zero), X, Y, X1) -> U1_ggga(X, Y, X1, write_in_g('Move top disk from ')) U1_ggga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggga(X, Y, X1, write_in_g(X)) U2_ggga(X, Y, X1, write_out_g(X)) -> U3_ggga(X, Y, X1, write_in_g(' to ')) U3_ggga(X, Y, X1, write_out_g(' to ')) -> U4_ggga(X, Y, X1, write_in_g(Y)) U4_ggga(X, Y, X1, write_out_g(Y)) -> U5_ggga(X, Y, X1, nl_in_) U5_ggga(X, Y, X1, nl_out_) -> move_out_ggga(succ(zero), X, Y, X1) move_in_ggga(N, X, Y, Z) -> U6_ggga(N, X, Y, Z, =_in_ag(X1, N)) U6_ggga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggga(N, X, Y, Z, =_in_ag(M, U)) U10_ggga(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggga(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) move_in_ggag(succ(zero), X, Y, X1) -> U1_ggag(X, Y, X1, write_in_g('Move top disk from ')) U1_ggag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggag(X, Y, X1, write_in_g(X)) U2_ggag(X, Y, X1, write_out_g(X)) -> U3_ggag(X, Y, X1, write_in_g(' to ')) U3_ggag(X, Y, X1, write_out_g(' to ')) -> U4_ggag(X, Y, X1, write_in_a(Y)) write_in_a(X0) -> write_out_a(X0) U4_ggag(X, Y, X1, write_out_a(Y)) -> U5_ggag(X, Y, X1, nl_in_) U5_ggag(X, Y, X1, nl_out_) -> move_out_ggag(succ(zero), X, Y, X1) move_in_ggag(N, X, Y, Z) -> U6_ggag(N, X, Y, Z, =_in_ag(X1, N)) U6_ggag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggag(N, X, Y, Z, =_in_ag(M, U)) U10_ggag(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggag(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U11_ggag(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_ggag(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) move_in_ggaa(succ(zero), X, Y, X1) -> U1_ggaa(X, Y, X1, write_in_g('Move top disk from ')) U1_ggaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggaa(X, Y, X1, write_in_g(X)) U2_ggaa(X, Y, X1, write_out_g(X)) -> U3_ggaa(X, Y, X1, write_in_g(' to ')) U3_ggaa(X, Y, X1, write_out_g(' to ')) -> U4_ggaa(X, Y, X1, write_in_a(Y)) U4_ggaa(X, Y, X1, write_out_a(Y)) -> U5_ggaa(X, Y, X1, nl_in_) U5_ggaa(X, Y, X1, nl_out_) -> move_out_ggaa(succ(zero), X, Y, X1) move_in_ggaa(N, X, Y, Z) -> U6_ggaa(N, X, Y, Z, =_in_ag(X1, N)) U6_ggaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggaa(N, X, Y, Z, =_in_ag(M, U)) U10_ggaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggaa(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U11_ggaa(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_ggaa(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_ggaa(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggaa(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) move_in_gaag(succ(zero), X, Y, X1) -> U1_gaag(X, Y, X1, write_in_g('Move top disk from ')) U1_gaag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaag(X, Y, X1, write_in_a(X)) U2_gaag(X, Y, X1, write_out_a(X)) -> U3_gaag(X, Y, X1, write_in_g(' to ')) U3_gaag(X, Y, X1, write_out_g(' to ')) -> U4_gaag(X, Y, X1, write_in_a(Y)) U4_gaag(X, Y, X1, write_out_a(Y)) -> U5_gaag(X, Y, X1, nl_in_) U5_gaag(X, Y, X1, nl_out_) -> move_out_gaag(succ(zero), X, Y, X1) move_in_gaag(N, X, Y, Z) -> U6_gaag(N, X, Y, Z, =_in_ag(X1, N)) U6_gaag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaag(N, X, Y, Z, =_in_ag(M, U)) U10_gaag(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaag(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) move_in_gaga(succ(zero), X, Y, X1) -> U1_gaga(X, Y, X1, write_in_g('Move top disk from ')) U1_gaga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaga(X, Y, X1, write_in_a(X)) U2_gaga(X, Y, X1, write_out_a(X)) -> U3_gaga(X, Y, X1, write_in_g(' to ')) U3_gaga(X, Y, X1, write_out_g(' to ')) -> U4_gaga(X, Y, X1, write_in_g(Y)) U4_gaga(X, Y, X1, write_out_g(Y)) -> U5_gaga(X, Y, X1, nl_in_) U5_gaga(X, Y, X1, nl_out_) -> move_out_gaga(succ(zero), X, Y, X1) move_in_gaga(N, X, Y, Z) -> U6_gaga(N, X, Y, Z, =_in_ag(X1, N)) U6_gaga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaga(N, X, Y, Z, =_in_ag(M, U)) U10_gaga(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaga(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U11_gaga(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_gaga(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gaga(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gaga(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U13_gaga(N, X, Y, Z, move_out_gaga(M, Z, Y, X)) -> move_out_gaga(N, X, Y, Z) U11_gaag(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_gaag(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) move_in_gaaa(succ(zero), X, Y, X1) -> U1_gaaa(X, Y, X1, write_in_g('Move top disk from ')) U1_gaaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaaa(X, Y, X1, write_in_a(X)) U2_gaaa(X, Y, X1, write_out_a(X)) -> U3_gaaa(X, Y, X1, write_in_g(' to ')) U3_gaaa(X, Y, X1, write_out_g(' to ')) -> U4_gaaa(X, Y, X1, write_in_a(Y)) U4_gaaa(X, Y, X1, write_out_a(Y)) -> U5_gaaa(X, Y, X1, nl_in_) U5_gaaa(X, Y, X1, nl_out_) -> move_out_gaaa(succ(zero), X, Y, X1) move_in_gaaa(N, X, Y, Z) -> U6_gaaa(N, X, Y, Z, =_in_ag(X1, N)) U6_gaaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaaa(N, X, Y, Z, =_in_ag(M, U)) U10_gaaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaaa(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U11_gaaa(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_gaaa(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_gaaa(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaaa(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U13_gaaa(N, X, Y, Z, move_out_gaaa(M, Z, Y, X)) -> move_out_gaaa(N, X, Y, Z) U12_gaag(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaag(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) U13_gaag(N, X, Y, Z, move_out_ggaa(M, Z, Y, X)) -> move_out_gaag(N, X, Y, Z) U13_ggaa(N, X, Y, Z, move_out_gaag(M, Z, Y, X)) -> move_out_ggaa(N, X, Y, Z) U12_ggag(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggag(N, X, Y, Z, move_in_ggag(M, Z, Y, X)) U13_ggag(N, X, Y, Z, move_out_ggag(M, Z, Y, X)) -> move_out_ggag(N, X, Y, Z) U11_ggga(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_ggga(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U12_ggga(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_ggga(N, X, Y, Z, move_in_gagg(M, Z, Y, X)) move_in_gagg(succ(zero), X, Y, X1) -> U1_gagg(X, Y, X1, write_in_g('Move top disk from ')) U1_gagg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gagg(X, Y, X1, write_in_a(X)) U2_gagg(X, Y, X1, write_out_a(X)) -> U3_gagg(X, Y, X1, write_in_g(' to ')) U3_gagg(X, Y, X1, write_out_g(' to ')) -> U4_gagg(X, Y, X1, write_in_g(Y)) U4_gagg(X, Y, X1, write_out_g(Y)) -> U5_gagg(X, Y, X1, nl_in_) U5_gagg(X, Y, X1, nl_out_) -> move_out_gagg(succ(zero), X, Y, X1) move_in_gagg(N, X, Y, Z) -> U6_gagg(N, X, Y, Z, =_in_ag(X1, N)) U6_gagg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gagg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gagg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gagg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gagg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gagg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gagg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gagg(N, X, Y, Z, =_in_ag(M, U)) U10_gagg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gagg(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U11_gagg(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_gagg(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gagg(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gagg(N, X, Y, Z, move_in_ggga(M, Z, Y, X)) U13_gagg(N, X, Y, Z, move_out_ggga(M, Z, Y, X)) -> move_out_gagg(N, X, Y, Z) U13_ggga(N, X, Y, Z, move_out_gagg(M, Z, Y, X)) -> move_out_ggga(N, X, Y, Z) U12_gggg(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_gggg(N, X, Y, Z, move_in_gggg(M, Z, Y, X)) U13_gggg(N, X, Y, Z, move_out_gggg(M, Z, Y, X)) -> move_out_gggg(N, X, Y, Z) The argument filtering Pi contains the following mapping: move_in_gggg(x1, x2, x3, x4) = move_in_gggg(x1, x2, x3, x4) succ(x1) = succ(x1) zero = zero U1_gggg(x1, x2, x3, x4) = U1_gggg(x1, x2, x4) write_in_g(x1) = write_in_g(x1) write_out_g(x1) = write_out_g 'Move top disk from ' = 'Move top disk from ' U2_gggg(x1, x2, x3, x4) = U2_gggg(x2, x4) U3_gggg(x1, x2, x3, x4) = U3_gggg(x2, x4) ' to ' = ' to ' U4_gggg(x1, x2, x3, x4) = U4_gggg(x4) U5_gggg(x1, x2, x3, x4) = U5_gggg(x4) nl_in_ = nl_in_ nl_out_ = nl_out_ move_out_gggg(x1, x2, x3, x4) = move_out_gggg U6_gggg(x1, x2, x3, x4, x5) = U6_gggg(x1, x2, x3, x4, x5) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U7_gggg(x1, x2, x3, x4, x5, x6) = U7_gggg(x1, x2, x3, x4, x5, x6) U8_gggg(x1, x2, x3, x4, x5, x6, x7) = U8_gggg(x1, x2, x3, x4, x7) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U47_gg(x1, x2, x3) = U47_gg(x3) U48_gg(x1, x2, x3) = U48_gg(x3) U9_gggg(x1, x2, x3, x4, x5) = U9_gggg(x2, x3, x4, x5) isMinus_in_gga(x1, x2, x3) = isMinus_in_gga(x1, x2) isMinus_out_gga(x1, x2, x3) = isMinus_out_gga(x3) U18_gga(x1, x2, x3) = U18_gga(x3) U19_gga(x1, x2, x3) = U19_gga(x3) U20_gga(x1, x2, x3, x4) = U20_gga(x4) U21_gga(x1, x2, x3, x4) = U21_gga(x4) U22_gga(x1, x2, x3, x4) = U22_gga(x4) U23_gga(x1, x2, x3, x4) = U23_gga(x4) U10_gggg(x1, x2, x3, x4, x5) = U10_gggg(x2, x3, x4, x5) U11_gggg(x1, x2, x3, x4, x5, x6) = U11_gggg(x2, x3, x4, x5, x6) U12_gggg(x1, x2, x3, x4, x5, x6) = U12_gggg(x2, x3, x4, x5, x6) move_in_ggga(x1, x2, x3, x4) = move_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4) = U1_ggga(x1, x2, x4) U2_ggga(x1, x2, x3, x4) = U2_ggga(x2, x4) U3_ggga(x1, x2, x3, x4) = U3_ggga(x2, x4) U4_ggga(x1, x2, x3, x4) = U4_ggga(x4) U5_ggga(x1, x2, x3, x4) = U5_ggga(x4) move_out_ggga(x1, x2, x3, x4) = move_out_ggga U6_ggga(x1, x2, x3, x4, x5) = U6_ggga(x1, x2, x3, x5) U7_ggga(x1, x2, x3, x4, x5, x6) = U7_ggga(x1, x2, x3, x5, x6) U8_ggga(x1, x2, x3, x4, x5, x6, x7) = U8_ggga(x1, x2, x3, x7) U9_ggga(x1, x2, x3, x4, x5) = U9_ggga(x2, x3, x5) U10_ggga(x1, x2, x3, x4, x5) = U10_ggga(x2, x3, x5) U11_ggga(x1, x2, x3, x4, x5, x6) = U11_ggga(x2, x3, x5, x6) move_in_ggag(x1, x2, x3, x4) = move_in_ggag(x1, x2, x4) U1_ggag(x1, x2, x3, x4) = U1_ggag(x1, x4) U2_ggag(x1, x2, x3, x4) = U2_ggag(x4) U3_ggag(x1, x2, x3, x4) = U3_ggag(x4) U4_ggag(x1, x2, x3, x4) = U4_ggag(x4) write_in_a(x1) = write_in_a write_out_a(x1) = write_out_a U5_ggag(x1, x2, x3, x4) = U5_ggag(x4) move_out_ggag(x1, x2, x3, x4) = move_out_ggag U6_ggag(x1, x2, x3, x4, x5) = U6_ggag(x1, x2, x4, x5) U7_ggag(x1, x2, x3, x4, x5, x6) = U7_ggag(x1, x2, x4, x5, x6) U8_ggag(x1, x2, x3, x4, x5, x6, x7) = U8_ggag(x1, x2, x4, x7) U9_ggag(x1, x2, x3, x4, x5) = U9_ggag(x2, x4, x5) U10_ggag(x1, x2, x3, x4, x5) = U10_ggag(x2, x4, x5) U11_ggag(x1, x2, x3, x4, x5, x6) = U11_ggag(x2, x4, x5, x6) U12_ggag(x1, x2, x3, x4, x5, x6) = U12_ggag(x2, x4, x5, x6) move_in_ggaa(x1, x2, x3, x4) = move_in_ggaa(x1, x2) U1_ggaa(x1, x2, x3, x4) = U1_ggaa(x1, x4) U2_ggaa(x1, x2, x3, x4) = U2_ggaa(x4) U3_ggaa(x1, x2, x3, x4) = U3_ggaa(x4) U4_ggaa(x1, x2, x3, x4) = U4_ggaa(x4) U5_ggaa(x1, x2, x3, x4) = U5_ggaa(x4) move_out_ggaa(x1, x2, x3, x4) = move_out_ggaa U6_ggaa(x1, x2, x3, x4, x5) = U6_ggaa(x1, x2, x5) U7_ggaa(x1, x2, x3, x4, x5, x6) = U7_ggaa(x1, x2, x5, x6) U8_ggaa(x1, x2, x3, x4, x5, x6, x7) = U8_ggaa(x1, x2, x7) U9_ggaa(x1, x2, x3, x4, x5) = U9_ggaa(x2, x5) U10_ggaa(x1, x2, x3, x4, x5) = U10_ggaa(x2, x5) U11_ggaa(x1, x2, x3, x4, x5, x6) = U11_ggaa(x2, x5, x6) U12_ggaa(x1, x2, x3, x4, x5, x6) = U12_ggaa(x2, x5, x6) U13_ggaa(x1, x2, x3, x4, x5) = U13_ggaa(x5) move_in_gaag(x1, x2, x3, x4) = move_in_gaag(x1, x4) U1_gaag(x1, x2, x3, x4) = U1_gaag(x4) U2_gaag(x1, x2, x3, x4) = U2_gaag(x4) U3_gaag(x1, x2, x3, x4) = U3_gaag(x4) U4_gaag(x1, x2, x3, x4) = U4_gaag(x4) U5_gaag(x1, x2, x3, x4) = U5_gaag(x4) move_out_gaag(x1, x2, x3, x4) = move_out_gaag U6_gaag(x1, x2, x3, x4, x5) = U6_gaag(x1, x4, x5) U7_gaag(x1, x2, x3, x4, x5, x6) = U7_gaag(x1, x4, x5, x6) U8_gaag(x1, x2, x3, x4, x5, x6, x7) = U8_gaag(x1, x4, x7) U9_gaag(x1, x2, x3, x4, x5) = U9_gaag(x4, x5) U10_gaag(x1, x2, x3, x4, x5) = U10_gaag(x4, x5) U11_gaag(x1, x2, x3, x4, x5, x6) = U11_gaag(x4, x5, x6) move_in_gaga(x1, x2, x3, x4) = move_in_gaga(x1, x3) U1_gaga(x1, x2, x3, x4) = U1_gaga(x2, x4) U2_gaga(x1, x2, x3, x4) = U2_gaga(x2, x4) U3_gaga(x1, x2, x3, x4) = U3_gaga(x2, x4) U4_gaga(x1, x2, x3, x4) = U4_gaga(x4) U5_gaga(x1, x2, x3, x4) = U5_gaga(x4) move_out_gaga(x1, x2, x3, x4) = move_out_gaga U6_gaga(x1, x2, x3, x4, x5) = U6_gaga(x1, x3, x5) U7_gaga(x1, x2, x3, x4, x5, x6) = U7_gaga(x1, x3, x5, x6) U8_gaga(x1, x2, x3, x4, x5, x6, x7) = U8_gaga(x1, x3, x7) U9_gaga(x1, x2, x3, x4, x5) = U9_gaga(x3, x5) U10_gaga(x1, x2, x3, x4, x5) = U10_gaga(x3, x5) U11_gaga(x1, x2, x3, x4, x5, x6) = U11_gaga(x3, x5, x6) U12_gaga(x1, x2, x3, x4, x5, x6) = U12_gaga(x3, x5, x6) U13_gaga(x1, x2, x3, x4, x5) = U13_gaga(x5) U12_gaag(x1, x2, x3, x4, x5, x6) = U12_gaag(x4, x5, x6) move_in_gaaa(x1, x2, x3, x4) = move_in_gaaa(x1) U1_gaaa(x1, x2, x3, x4) = U1_gaaa(x4) U2_gaaa(x1, x2, x3, x4) = U2_gaaa(x4) U3_gaaa(x1, x2, x3, x4) = U3_gaaa(x4) U4_gaaa(x1, x2, x3, x4) = U4_gaaa(x4) U5_gaaa(x1, x2, x3, x4) = U5_gaaa(x4) move_out_gaaa(x1, x2, x3, x4) = move_out_gaaa U6_gaaa(x1, x2, x3, x4, x5) = U6_gaaa(x1, x5) U7_gaaa(x1, x2, x3, x4, x5, x6) = U7_gaaa(x1, x5, x6) U8_gaaa(x1, x2, x3, x4, x5, x6, x7) = U8_gaaa(x1, x7) U9_gaaa(x1, x2, x3, x4, x5) = U9_gaaa(x5) U10_gaaa(x1, x2, x3, x4, x5) = U10_gaaa(x5) U11_gaaa(x1, x2, x3, x4, x5, x6) = U11_gaaa(x5, x6) U12_gaaa(x1, x2, x3, x4, x5, x6) = U12_gaaa(x5, x6) U13_gaaa(x1, x2, x3, x4, x5) = U13_gaaa(x5) U13_gaag(x1, x2, x3, x4, x5) = U13_gaag(x5) U13_ggag(x1, x2, x3, x4, x5) = U13_ggag(x5) U12_ggga(x1, x2, x3, x4, x5, x6) = U12_ggga(x2, x3, x5, x6) U13_ggga(x1, x2, x3, x4, x5) = U13_ggga(x5) move_in_gagg(x1, x2, x3, x4) = move_in_gagg(x1, x3, x4) U1_gagg(x1, x2, x3, x4) = U1_gagg(x2, x4) U2_gagg(x1, x2, x3, x4) = U2_gagg(x2, x4) U3_gagg(x1, x2, x3, x4) = U3_gagg(x2, x4) U4_gagg(x1, x2, x3, x4) = U4_gagg(x4) U5_gagg(x1, x2, x3, x4) = U5_gagg(x4) move_out_gagg(x1, x2, x3, x4) = move_out_gagg U6_gagg(x1, x2, x3, x4, x5) = U6_gagg(x1, x3, x4, x5) U7_gagg(x1, x2, x3, x4, x5, x6) = U7_gagg(x1, x3, x4, x5, x6) U8_gagg(x1, x2, x3, x4, x5, x6, x7) = U8_gagg(x1, x3, x4, x7) U9_gagg(x1, x2, x3, x4, x5) = U9_gagg(x3, x4, x5) U10_gagg(x1, x2, x3, x4, x5) = U10_gagg(x3, x4, x5) U11_gagg(x1, x2, x3, x4, x5, x6) = U11_gagg(x3, x4, x5, x6) U12_gagg(x1, x2, x3, x4, x5, x6) = U12_gagg(x3, x4, x5, x6) U13_gagg(x1, x2, x3, x4, x5) = U13_gagg(x5) U13_gggg(x1, x2, x3, x4, x5) = U13_gggg(x5) ---------------------------------------- (9) 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: MOVE_IN_GGGG(succ(zero), X, Y, X1) -> U1_GGGG(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GGGG(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GGGG(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GGGG(X, Y, X1, write_in_g(X)) U1_GGGG(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_G(X) U2_GGGG(X, Y, X1, write_out_g(X)) -> U3_GGGG(X, Y, X1, write_in_g(' to ')) U2_GGGG(X, Y, X1, write_out_g(X)) -> WRITE_IN_G(' to ') U3_GGGG(X, Y, X1, write_out_g(' to ')) -> U4_GGGG(X, Y, X1, write_in_g(Y)) U3_GGGG(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_G(Y) U4_GGGG(X, Y, X1, write_out_g(Y)) -> U5_GGGG(X, Y, X1, nl_in_) U4_GGGG(X, Y, X1, write_out_g(Y)) -> NL_IN_ MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GGGG(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GGGG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGGG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GGGG(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GGGG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGGG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GGGG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) ISGREATER_IN_GG(succ(X), succ(Y)) -> U47_GG(X, Y, isGreater_in_gg(X, Y)) ISGREATER_IN_GG(succ(X), succ(Y)) -> ISGREATER_IN_GG(X, Y) ISGREATER_IN_GG(pred(X), pred(Y)) -> U48_GG(X, Y, isGreater_in_gg(X, Y)) ISGREATER_IN_GG(pred(X), pred(Y)) -> ISGREATER_IN_GG(X, Y) U8_GGGG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGGG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GGGG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) ISMINUS_IN_GGA(zero, succ(Y), pred(Z)) -> U18_GGA(Y, Z, isMinus_in_gga(zero, Y, Z)) ISMINUS_IN_GGA(zero, succ(Y), pred(Z)) -> ISMINUS_IN_GGA(zero, Y, Z) ISMINUS_IN_GGA(zero, pred(Y), succ(Z)) -> U19_GGA(Y, Z, isMinus_in_gga(zero, Y, Z)) ISMINUS_IN_GGA(zero, pred(Y), succ(Z)) -> ISMINUS_IN_GGA(zero, Y, Z) ISMINUS_IN_GGA(succ(X), succ(Y), Z) -> U20_GGA(X, Y, Z, isMinus_in_gga(X, Y, Z)) ISMINUS_IN_GGA(succ(X), succ(Y), Z) -> ISMINUS_IN_GGA(X, Y, Z) ISMINUS_IN_GGA(succ(X), pred(Y), succ(succ(Z))) -> U21_GGA(X, Y, Z, isMinus_in_gga(X, Y, Z)) ISMINUS_IN_GGA(succ(X), pred(Y), succ(succ(Z))) -> ISMINUS_IN_GGA(X, Y, Z) ISMINUS_IN_GGA(pred(X), succ(Y), pred(pred(Z))) -> U22_GGA(X, Y, Z, isMinus_in_gga(X, Y, Z)) ISMINUS_IN_GGA(pred(X), succ(Y), pred(pred(Z))) -> ISMINUS_IN_GGA(X, Y, Z) ISMINUS_IN_GGA(pred(X), pred(Y), Z) -> U23_GGA(X, Y, Z, isMinus_in_gga(X, Y, Z)) ISMINUS_IN_GGA(pred(X), pred(Y), Z) -> ISMINUS_IN_GGA(X, Y, Z) U9_GGGG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGGG(N, X, Y, Z, =_in_ag(M, U)) U9_GGGG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GGGG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGGG(N, X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U10_GGGG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGGG(M, X, Z, Y) U11_GGGG(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> U12_GGGG(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U11_GGGG(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> MOVE_IN_GGGA(succ(zero), X, Y, X2) MOVE_IN_GGGA(succ(zero), X, Y, X1) -> U1_GGGA(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GGGA(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GGGA(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GGGA(X, Y, X1, write_in_g(X)) U1_GGGA(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_G(X) U2_GGGA(X, Y, X1, write_out_g(X)) -> U3_GGGA(X, Y, X1, write_in_g(' to ')) U2_GGGA(X, Y, X1, write_out_g(X)) -> WRITE_IN_G(' to ') U3_GGGA(X, Y, X1, write_out_g(' to ')) -> U4_GGGA(X, Y, X1, write_in_g(Y)) U3_GGGA(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_G(Y) U4_GGGA(X, Y, X1, write_out_g(Y)) -> U5_GGGA(X, Y, X1, nl_in_) U4_GGGA(X, Y, X1, write_out_g(Y)) -> NL_IN_ MOVE_IN_GGGA(N, X, Y, Z) -> U6_GGGA(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GGGA(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GGGA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGGA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GGGA(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GGGA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGGA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GGGA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) U8_GGGA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGGA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GGGA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) U9_GGGA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGGA(N, X, Y, Z, =_in_ag(M, U)) U9_GGGA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GGGA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGGA(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) U10_GGGA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGAG(M, X, Z, Y) MOVE_IN_GGAG(succ(zero), X, Y, X1) -> U1_GGAG(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GGAG(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GGAG(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GGAG(X, Y, X1, write_in_g(X)) U1_GGAG(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_G(X) U2_GGAG(X, Y, X1, write_out_g(X)) -> U3_GGAG(X, Y, X1, write_in_g(' to ')) U2_GGAG(X, Y, X1, write_out_g(X)) -> WRITE_IN_G(' to ') U3_GGAG(X, Y, X1, write_out_g(' to ')) -> U4_GGAG(X, Y, X1, write_in_a(Y)) U3_GGAG(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_A(Y) U4_GGAG(X, Y, X1, write_out_a(Y)) -> U5_GGAG(X, Y, X1, nl_in_) U4_GGAG(X, Y, X1, write_out_a(Y)) -> NL_IN_ MOVE_IN_GGAG(N, X, Y, Z) -> U6_GGAG(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GGAG(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GGAG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGAG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GGAG(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GGAG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGAG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GGAG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) U8_GGAG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGAG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GGAG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) U9_GGAG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGAG(N, X, Y, Z, =_in_ag(M, U)) U9_GGAG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GGAG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGAG(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U10_GGAG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGGA(M, X, Z, Y) U11_GGAG(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_GGAG(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U11_GGAG(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> MOVE_IN_GGAA(succ(zero), X, Y, X2) MOVE_IN_GGAA(succ(zero), X, Y, X1) -> U1_GGAA(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GGAA(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GGAA(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GGAA(X, Y, X1, write_in_g(X)) U1_GGAA(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_G(X) U2_GGAA(X, Y, X1, write_out_g(X)) -> U3_GGAA(X, Y, X1, write_in_g(' to ')) U2_GGAA(X, Y, X1, write_out_g(X)) -> WRITE_IN_G(' to ') U3_GGAA(X, Y, X1, write_out_g(' to ')) -> U4_GGAA(X, Y, X1, write_in_a(Y)) U3_GGAA(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_A(Y) U4_GGAA(X, Y, X1, write_out_a(Y)) -> U5_GGAA(X, Y, X1, nl_in_) U4_GGAA(X, Y, X1, write_out_a(Y)) -> NL_IN_ MOVE_IN_GGAA(N, X, Y, Z) -> U6_GGAA(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GGAA(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GGAA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGAA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GGAA(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GGAA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGAA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GGAA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) U8_GGAA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGAA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GGAA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) U9_GGAA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGAA(N, X, Y, Z, =_in_ag(M, U)) U9_GGAA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GGAA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGAA(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U10_GGAA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGAA(M, X, Z, Y) U11_GGAA(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_GGAA(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U11_GGAA(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> MOVE_IN_GGAA(succ(zero), X, Y, X2) U12_GGAA(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_GGAA(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) U12_GGAA(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> MOVE_IN_GAAG(M, Z, Y, X) MOVE_IN_GAAG(succ(zero), X, Y, X1) -> U1_GAAG(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GAAG(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GAAG(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GAAG(X, Y, X1, write_in_a(X)) U1_GAAG(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_A(X) U2_GAAG(X, Y, X1, write_out_a(X)) -> U3_GAAG(X, Y, X1, write_in_g(' to ')) U2_GAAG(X, Y, X1, write_out_a(X)) -> WRITE_IN_G(' to ') U3_GAAG(X, Y, X1, write_out_g(' to ')) -> U4_GAAG(X, Y, X1, write_in_a(Y)) U3_GAAG(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_A(Y) U4_GAAG(X, Y, X1, write_out_a(Y)) -> U5_GAAG(X, Y, X1, nl_in_) U4_GAAG(X, Y, X1, write_out_a(Y)) -> NL_IN_ MOVE_IN_GAAG(N, X, Y, Z) -> U6_GAAG(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GAAG(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GAAG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAAG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GAAG(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GAAG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAAG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GAAG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) U8_GAAG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAAG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GAAG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) U9_GAAG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAAG(N, X, Y, Z, =_in_ag(M, U)) U9_GAAG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GAAG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAAG(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) U10_GAAG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAGA(M, X, Z, Y) MOVE_IN_GAGA(succ(zero), X, Y, X1) -> U1_GAGA(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GAGA(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GAGA(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GAGA(X, Y, X1, write_in_a(X)) U1_GAGA(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_A(X) U2_GAGA(X, Y, X1, write_out_a(X)) -> U3_GAGA(X, Y, X1, write_in_g(' to ')) U2_GAGA(X, Y, X1, write_out_a(X)) -> WRITE_IN_G(' to ') U3_GAGA(X, Y, X1, write_out_g(' to ')) -> U4_GAGA(X, Y, X1, write_in_g(Y)) U3_GAGA(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_G(Y) U4_GAGA(X, Y, X1, write_out_g(Y)) -> U5_GAGA(X, Y, X1, nl_in_) U4_GAGA(X, Y, X1, write_out_g(Y)) -> NL_IN_ MOVE_IN_GAGA(N, X, Y, Z) -> U6_GAGA(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GAGA(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GAGA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAGA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GAGA(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GAGA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAGA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GAGA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) U8_GAGA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAGA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GAGA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) U9_GAGA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAGA(N, X, Y, Z, =_in_ag(M, U)) U9_GAGA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GAGA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAGA(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U10_GAGA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAAG(M, X, Z, Y) U11_GAGA(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_GAGA(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U11_GAGA(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> MOVE_IN_GAGA(succ(zero), X, Y, X2) U12_GAGA(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_GAGA(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U12_GAGA(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> MOVE_IN_GAGA(M, Z, Y, X) U11_GAAG(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_GAAG(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U11_GAAG(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> MOVE_IN_GAAA(succ(zero), X, Y, X2) MOVE_IN_GAAA(succ(zero), X, Y, X1) -> U1_GAAA(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GAAA(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GAAA(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GAAA(X, Y, X1, write_in_a(X)) U1_GAAA(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_A(X) U2_GAAA(X, Y, X1, write_out_a(X)) -> U3_GAAA(X, Y, X1, write_in_g(' to ')) U2_GAAA(X, Y, X1, write_out_a(X)) -> WRITE_IN_G(' to ') U3_GAAA(X, Y, X1, write_out_g(' to ')) -> U4_GAAA(X, Y, X1, write_in_a(Y)) U3_GAAA(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_A(Y) U4_GAAA(X, Y, X1, write_out_a(Y)) -> U5_GAAA(X, Y, X1, nl_in_) U4_GAAA(X, Y, X1, write_out_a(Y)) -> NL_IN_ MOVE_IN_GAAA(N, X, Y, Z) -> U6_GAAA(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GAAA(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GAAA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAAA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GAAA(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GAAA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAAA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GAAA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) U8_GAAA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAAA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GAAA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) U9_GAAA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAAA(N, X, Y, Z, =_in_ag(M, U)) U9_GAAA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GAAA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAAA(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U10_GAAA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAAA(M, X, Z, Y) U11_GAAA(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_GAAA(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U11_GAAA(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> MOVE_IN_GAAA(succ(zero), X, Y, X2) U12_GAAA(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_GAAA(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U12_GAAA(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> MOVE_IN_GAAA(M, Z, Y, X) U12_GAAG(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_GAAG(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) U12_GAAG(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> MOVE_IN_GGAA(M, Z, Y, X) U12_GGAG(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_GGAG(N, X, Y, Z, move_in_ggag(M, Z, Y, X)) U12_GGAG(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> MOVE_IN_GGAG(M, Z, Y, X) U11_GGGA(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_GGGA(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U11_GGGA(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> MOVE_IN_GGGA(succ(zero), X, Y, X2) U12_GGGA(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_GGGA(N, X, Y, Z, move_in_gagg(M, Z, Y, X)) U12_GGGA(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> MOVE_IN_GAGG(M, Z, Y, X) MOVE_IN_GAGG(succ(zero), X, Y, X1) -> U1_GAGG(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GAGG(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GAGG(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GAGG(X, Y, X1, write_in_a(X)) U1_GAGG(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_A(X) U2_GAGG(X, Y, X1, write_out_a(X)) -> U3_GAGG(X, Y, X1, write_in_g(' to ')) U2_GAGG(X, Y, X1, write_out_a(X)) -> WRITE_IN_G(' to ') U3_GAGG(X, Y, X1, write_out_g(' to ')) -> U4_GAGG(X, Y, X1, write_in_g(Y)) U3_GAGG(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_G(Y) U4_GAGG(X, Y, X1, write_out_g(Y)) -> U5_GAGG(X, Y, X1, nl_in_) U4_GAGG(X, Y, X1, write_out_g(Y)) -> NL_IN_ MOVE_IN_GAGG(N, X, Y, Z) -> U6_GAGG(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GAGG(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GAGG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAGG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GAGG(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GAGG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAGG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GAGG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) U8_GAGG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAGG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GAGG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) U9_GAGG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAGG(N, X, Y, Z, =_in_ag(M, U)) U9_GAGG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GAGG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAGG(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U10_GAGG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAGG(M, X, Z, Y) U11_GAGG(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_GAGG(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U11_GAGG(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> MOVE_IN_GAGA(succ(zero), X, Y, X2) U12_GAGG(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_GAGG(N, X, Y, Z, move_in_ggga(M, Z, Y, X)) U12_GAGG(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> MOVE_IN_GGGA(M, Z, Y, X) U12_GGGG(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_GGGG(N, X, Y, Z, move_in_gggg(M, Z, Y, X)) U12_GGGG(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> MOVE_IN_GGGG(M, Z, Y, X) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, X1, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g(X0) U1_gggg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gggg(X, Y, X1, write_in_g(X)) U2_gggg(X, Y, X1, write_out_g(X)) -> U3_gggg(X, Y, X1, write_in_g(' to ')) U3_gggg(X, Y, X1, write_out_g(' to ')) -> U4_gggg(X, Y, X1, write_in_g(Y)) U4_gggg(X, Y, X1, write_out_g(Y)) -> U5_gggg(X, Y, X1, nl_in_) nl_in_ -> nl_out_ U5_gggg(X, Y, X1, nl_out_) -> move_out_gggg(succ(zero), X, Y, X1) move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(X1, N)) =_in_ag(X, X) -> =_out_ag(X, X) U6_gggg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gggg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg(succ(X), zero) isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg(succ(X), pred(Y)) isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(X, Y, isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg(zero, pred(Y)) isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(X, Y, isGreater_in_gg(X, Y)) U48_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U47_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U8_gggg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gggg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) isMinus_in_gga(X, zero, X) -> isMinus_out_gga(X, zero, X) isMinus_in_gga(zero, succ(Y), pred(Z)) -> U18_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(zero, pred(Y), succ(Z)) -> U19_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), succ(Y), Z) -> U20_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(succ(X), pred(Y), succ(succ(Z))) -> U21_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), succ(Y), pred(pred(Z))) -> U22_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), pred(Y), Z) -> U23_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) U23_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), pred(Y), Z) U22_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), succ(Y), pred(pred(Z))) U21_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), pred(Y), succ(succ(Z))) U20_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), succ(Y), Z) U19_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, pred(Y), succ(Z)) U18_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, succ(Y), pred(Z)) U9_gggg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gggg(N, X, Y, Z, =_in_ag(M, U)) U10_gggg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gggg(N, X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> U12_gggg(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) move_in_ggga(succ(zero), X, Y, X1) -> U1_ggga(X, Y, X1, write_in_g('Move top disk from ')) U1_ggga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggga(X, Y, X1, write_in_g(X)) U2_ggga(X, Y, X1, write_out_g(X)) -> U3_ggga(X, Y, X1, write_in_g(' to ')) U3_ggga(X, Y, X1, write_out_g(' to ')) -> U4_ggga(X, Y, X1, write_in_g(Y)) U4_ggga(X, Y, X1, write_out_g(Y)) -> U5_ggga(X, Y, X1, nl_in_) U5_ggga(X, Y, X1, nl_out_) -> move_out_ggga(succ(zero), X, Y, X1) move_in_ggga(N, X, Y, Z) -> U6_ggga(N, X, Y, Z, =_in_ag(X1, N)) U6_ggga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggga(N, X, Y, Z, =_in_ag(M, U)) U10_ggga(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggga(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) move_in_ggag(succ(zero), X, Y, X1) -> U1_ggag(X, Y, X1, write_in_g('Move top disk from ')) U1_ggag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggag(X, Y, X1, write_in_g(X)) U2_ggag(X, Y, X1, write_out_g(X)) -> U3_ggag(X, Y, X1, write_in_g(' to ')) U3_ggag(X, Y, X1, write_out_g(' to ')) -> U4_ggag(X, Y, X1, write_in_a(Y)) write_in_a(X0) -> write_out_a(X0) U4_ggag(X, Y, X1, write_out_a(Y)) -> U5_ggag(X, Y, X1, nl_in_) U5_ggag(X, Y, X1, nl_out_) -> move_out_ggag(succ(zero), X, Y, X1) move_in_ggag(N, X, Y, Z) -> U6_ggag(N, X, Y, Z, =_in_ag(X1, N)) U6_ggag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggag(N, X, Y, Z, =_in_ag(M, U)) U10_ggag(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggag(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U11_ggag(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_ggag(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) move_in_ggaa(succ(zero), X, Y, X1) -> U1_ggaa(X, Y, X1, write_in_g('Move top disk from ')) U1_ggaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggaa(X, Y, X1, write_in_g(X)) U2_ggaa(X, Y, X1, write_out_g(X)) -> U3_ggaa(X, Y, X1, write_in_g(' to ')) U3_ggaa(X, Y, X1, write_out_g(' to ')) -> U4_ggaa(X, Y, X1, write_in_a(Y)) U4_ggaa(X, Y, X1, write_out_a(Y)) -> U5_ggaa(X, Y, X1, nl_in_) U5_ggaa(X, Y, X1, nl_out_) -> move_out_ggaa(succ(zero), X, Y, X1) move_in_ggaa(N, X, Y, Z) -> U6_ggaa(N, X, Y, Z, =_in_ag(X1, N)) U6_ggaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggaa(N, X, Y, Z, =_in_ag(M, U)) U10_ggaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggaa(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U11_ggaa(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_ggaa(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_ggaa(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggaa(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) move_in_gaag(succ(zero), X, Y, X1) -> U1_gaag(X, Y, X1, write_in_g('Move top disk from ')) U1_gaag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaag(X, Y, X1, write_in_a(X)) U2_gaag(X, Y, X1, write_out_a(X)) -> U3_gaag(X, Y, X1, write_in_g(' to ')) U3_gaag(X, Y, X1, write_out_g(' to ')) -> U4_gaag(X, Y, X1, write_in_a(Y)) U4_gaag(X, Y, X1, write_out_a(Y)) -> U5_gaag(X, Y, X1, nl_in_) U5_gaag(X, Y, X1, nl_out_) -> move_out_gaag(succ(zero), X, Y, X1) move_in_gaag(N, X, Y, Z) -> U6_gaag(N, X, Y, Z, =_in_ag(X1, N)) U6_gaag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaag(N, X, Y, Z, =_in_ag(M, U)) U10_gaag(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaag(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) move_in_gaga(succ(zero), X, Y, X1) -> U1_gaga(X, Y, X1, write_in_g('Move top disk from ')) U1_gaga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaga(X, Y, X1, write_in_a(X)) U2_gaga(X, Y, X1, write_out_a(X)) -> U3_gaga(X, Y, X1, write_in_g(' to ')) U3_gaga(X, Y, X1, write_out_g(' to ')) -> U4_gaga(X, Y, X1, write_in_g(Y)) U4_gaga(X, Y, X1, write_out_g(Y)) -> U5_gaga(X, Y, X1, nl_in_) U5_gaga(X, Y, X1, nl_out_) -> move_out_gaga(succ(zero), X, Y, X1) move_in_gaga(N, X, Y, Z) -> U6_gaga(N, X, Y, Z, =_in_ag(X1, N)) U6_gaga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaga(N, X, Y, Z, =_in_ag(M, U)) U10_gaga(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaga(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U11_gaga(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_gaga(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gaga(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gaga(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U13_gaga(N, X, Y, Z, move_out_gaga(M, Z, Y, X)) -> move_out_gaga(N, X, Y, Z) U11_gaag(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_gaag(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) move_in_gaaa(succ(zero), X, Y, X1) -> U1_gaaa(X, Y, X1, write_in_g('Move top disk from ')) U1_gaaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaaa(X, Y, X1, write_in_a(X)) U2_gaaa(X, Y, X1, write_out_a(X)) -> U3_gaaa(X, Y, X1, write_in_g(' to ')) U3_gaaa(X, Y, X1, write_out_g(' to ')) -> U4_gaaa(X, Y, X1, write_in_a(Y)) U4_gaaa(X, Y, X1, write_out_a(Y)) -> U5_gaaa(X, Y, X1, nl_in_) U5_gaaa(X, Y, X1, nl_out_) -> move_out_gaaa(succ(zero), X, Y, X1) move_in_gaaa(N, X, Y, Z) -> U6_gaaa(N, X, Y, Z, =_in_ag(X1, N)) U6_gaaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaaa(N, X, Y, Z, =_in_ag(M, U)) U10_gaaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaaa(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U11_gaaa(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_gaaa(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_gaaa(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaaa(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U13_gaaa(N, X, Y, Z, move_out_gaaa(M, Z, Y, X)) -> move_out_gaaa(N, X, Y, Z) U12_gaag(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaag(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) U13_gaag(N, X, Y, Z, move_out_ggaa(M, Z, Y, X)) -> move_out_gaag(N, X, Y, Z) U13_ggaa(N, X, Y, Z, move_out_gaag(M, Z, Y, X)) -> move_out_ggaa(N, X, Y, Z) U12_ggag(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggag(N, X, Y, Z, move_in_ggag(M, Z, Y, X)) U13_ggag(N, X, Y, Z, move_out_ggag(M, Z, Y, X)) -> move_out_ggag(N, X, Y, Z) U11_ggga(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_ggga(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U12_ggga(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_ggga(N, X, Y, Z, move_in_gagg(M, Z, Y, X)) move_in_gagg(succ(zero), X, Y, X1) -> U1_gagg(X, Y, X1, write_in_g('Move top disk from ')) U1_gagg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gagg(X, Y, X1, write_in_a(X)) U2_gagg(X, Y, X1, write_out_a(X)) -> U3_gagg(X, Y, X1, write_in_g(' to ')) U3_gagg(X, Y, X1, write_out_g(' to ')) -> U4_gagg(X, Y, X1, write_in_g(Y)) U4_gagg(X, Y, X1, write_out_g(Y)) -> U5_gagg(X, Y, X1, nl_in_) U5_gagg(X, Y, X1, nl_out_) -> move_out_gagg(succ(zero), X, Y, X1) move_in_gagg(N, X, Y, Z) -> U6_gagg(N, X, Y, Z, =_in_ag(X1, N)) U6_gagg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gagg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gagg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gagg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gagg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gagg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gagg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gagg(N, X, Y, Z, =_in_ag(M, U)) U10_gagg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gagg(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U11_gagg(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_gagg(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gagg(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gagg(N, X, Y, Z, move_in_ggga(M, Z, Y, X)) U13_gagg(N, X, Y, Z, move_out_ggga(M, Z, Y, X)) -> move_out_gagg(N, X, Y, Z) U13_ggga(N, X, Y, Z, move_out_gagg(M, Z, Y, X)) -> move_out_ggga(N, X, Y, Z) U12_gggg(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_gggg(N, X, Y, Z, move_in_gggg(M, Z, Y, X)) U13_gggg(N, X, Y, Z, move_out_gggg(M, Z, Y, X)) -> move_out_gggg(N, X, Y, Z) The argument filtering Pi contains the following mapping: move_in_gggg(x1, x2, x3, x4) = move_in_gggg(x1, x2, x3, x4) succ(x1) = succ(x1) zero = zero U1_gggg(x1, x2, x3, x4) = U1_gggg(x1, x2, x4) write_in_g(x1) = write_in_g(x1) write_out_g(x1) = write_out_g 'Move top disk from ' = 'Move top disk from ' U2_gggg(x1, x2, x3, x4) = U2_gggg(x2, x4) U3_gggg(x1, x2, x3, x4) = U3_gggg(x2, x4) ' to ' = ' to ' U4_gggg(x1, x2, x3, x4) = U4_gggg(x4) U5_gggg(x1, x2, x3, x4) = U5_gggg(x4) nl_in_ = nl_in_ nl_out_ = nl_out_ move_out_gggg(x1, x2, x3, x4) = move_out_gggg U6_gggg(x1, x2, x3, x4, x5) = U6_gggg(x1, x2, x3, x4, x5) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U7_gggg(x1, x2, x3, x4, x5, x6) = U7_gggg(x1, x2, x3, x4, x5, x6) U8_gggg(x1, x2, x3, x4, x5, x6, x7) = U8_gggg(x1, x2, x3, x4, x7) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U47_gg(x1, x2, x3) = U47_gg(x3) U48_gg(x1, x2, x3) = U48_gg(x3) U9_gggg(x1, x2, x3, x4, x5) = U9_gggg(x2, x3, x4, x5) isMinus_in_gga(x1, x2, x3) = isMinus_in_gga(x1, x2) isMinus_out_gga(x1, x2, x3) = isMinus_out_gga(x3) U18_gga(x1, x2, x3) = U18_gga(x3) U19_gga(x1, x2, x3) = U19_gga(x3) U20_gga(x1, x2, x3, x4) = U20_gga(x4) U21_gga(x1, x2, x3, x4) = U21_gga(x4) U22_gga(x1, x2, x3, x4) = U22_gga(x4) U23_gga(x1, x2, x3, x4) = U23_gga(x4) U10_gggg(x1, x2, x3, x4, x5) = U10_gggg(x2, x3, x4, x5) U11_gggg(x1, x2, x3, x4, x5, x6) = U11_gggg(x2, x3, x4, x5, x6) U12_gggg(x1, x2, x3, x4, x5, x6) = U12_gggg(x2, x3, x4, x5, x6) move_in_ggga(x1, x2, x3, x4) = move_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4) = U1_ggga(x1, x2, x4) U2_ggga(x1, x2, x3, x4) = U2_ggga(x2, x4) U3_ggga(x1, x2, x3, x4) = U3_ggga(x2, x4) U4_ggga(x1, x2, x3, x4) = U4_ggga(x4) U5_ggga(x1, x2, x3, x4) = U5_ggga(x4) move_out_ggga(x1, x2, x3, x4) = move_out_ggga U6_ggga(x1, x2, x3, x4, x5) = U6_ggga(x1, x2, x3, x5) U7_ggga(x1, x2, x3, x4, x5, x6) = U7_ggga(x1, x2, x3, x5, x6) U8_ggga(x1, x2, x3, x4, x5, x6, x7) = U8_ggga(x1, x2, x3, x7) U9_ggga(x1, x2, x3, x4, x5) = U9_ggga(x2, x3, x5) U10_ggga(x1, x2, x3, x4, x5) = U10_ggga(x2, x3, x5) U11_ggga(x1, x2, x3, x4, x5, x6) = U11_ggga(x2, x3, x5, x6) move_in_ggag(x1, x2, x3, x4) = move_in_ggag(x1, x2, x4) U1_ggag(x1, x2, x3, x4) = U1_ggag(x1, x4) U2_ggag(x1, x2, x3, x4) = U2_ggag(x4) U3_ggag(x1, x2, x3, x4) = U3_ggag(x4) U4_ggag(x1, x2, x3, x4) = U4_ggag(x4) write_in_a(x1) = write_in_a write_out_a(x1) = write_out_a U5_ggag(x1, x2, x3, x4) = U5_ggag(x4) move_out_ggag(x1, x2, x3, x4) = move_out_ggag U6_ggag(x1, x2, x3, x4, x5) = U6_ggag(x1, x2, x4, x5) U7_ggag(x1, x2, x3, x4, x5, x6) = U7_ggag(x1, x2, x4, x5, x6) U8_ggag(x1, x2, x3, x4, x5, x6, x7) = U8_ggag(x1, x2, x4, x7) U9_ggag(x1, x2, x3, x4, x5) = U9_ggag(x2, x4, x5) U10_ggag(x1, x2, x3, x4, x5) = U10_ggag(x2, x4, x5) U11_ggag(x1, x2, x3, x4, x5, x6) = U11_ggag(x2, x4, x5, x6) U12_ggag(x1, x2, x3, x4, x5, x6) = U12_ggag(x2, x4, x5, x6) move_in_ggaa(x1, x2, x3, x4) = move_in_ggaa(x1, x2) U1_ggaa(x1, x2, x3, x4) = U1_ggaa(x1, x4) U2_ggaa(x1, x2, x3, x4) = U2_ggaa(x4) U3_ggaa(x1, x2, x3, x4) = U3_ggaa(x4) U4_ggaa(x1, x2, x3, x4) = U4_ggaa(x4) U5_ggaa(x1, x2, x3, x4) = U5_ggaa(x4) move_out_ggaa(x1, x2, x3, x4) = move_out_ggaa U6_ggaa(x1, x2, x3, x4, x5) = U6_ggaa(x1, x2, x5) U7_ggaa(x1, x2, x3, x4, x5, x6) = U7_ggaa(x1, x2, x5, x6) U8_ggaa(x1, x2, x3, x4, x5, x6, x7) = U8_ggaa(x1, x2, x7) U9_ggaa(x1, x2, x3, x4, x5) = U9_ggaa(x2, x5) U10_ggaa(x1, x2, x3, x4, x5) = U10_ggaa(x2, x5) U11_ggaa(x1, x2, x3, x4, x5, x6) = U11_ggaa(x2, x5, x6) U12_ggaa(x1, x2, x3, x4, x5, x6) = U12_ggaa(x2, x5, x6) U13_ggaa(x1, x2, x3, x4, x5) = U13_ggaa(x5) move_in_gaag(x1, x2, x3, x4) = move_in_gaag(x1, x4) U1_gaag(x1, x2, x3, x4) = U1_gaag(x4) U2_gaag(x1, x2, x3, x4) = U2_gaag(x4) U3_gaag(x1, x2, x3, x4) = U3_gaag(x4) U4_gaag(x1, x2, x3, x4) = U4_gaag(x4) U5_gaag(x1, x2, x3, x4) = U5_gaag(x4) move_out_gaag(x1, x2, x3, x4) = move_out_gaag U6_gaag(x1, x2, x3, x4, x5) = U6_gaag(x1, x4, x5) U7_gaag(x1, x2, x3, x4, x5, x6) = U7_gaag(x1, x4, x5, x6) U8_gaag(x1, x2, x3, x4, x5, x6, x7) = U8_gaag(x1, x4, x7) U9_gaag(x1, x2, x3, x4, x5) = U9_gaag(x4, x5) U10_gaag(x1, x2, x3, x4, x5) = U10_gaag(x4, x5) U11_gaag(x1, x2, x3, x4, x5, x6) = U11_gaag(x4, x5, x6) move_in_gaga(x1, x2, x3, x4) = move_in_gaga(x1, x3) U1_gaga(x1, x2, x3, x4) = U1_gaga(x2, x4) U2_gaga(x1, x2, x3, x4) = U2_gaga(x2, x4) U3_gaga(x1, x2, x3, x4) = U3_gaga(x2, x4) U4_gaga(x1, x2, x3, x4) = U4_gaga(x4) U5_gaga(x1, x2, x3, x4) = U5_gaga(x4) move_out_gaga(x1, x2, x3, x4) = move_out_gaga U6_gaga(x1, x2, x3, x4, x5) = U6_gaga(x1, x3, x5) U7_gaga(x1, x2, x3, x4, x5, x6) = U7_gaga(x1, x3, x5, x6) U8_gaga(x1, x2, x3, x4, x5, x6, x7) = U8_gaga(x1, x3, x7) U9_gaga(x1, x2, x3, x4, x5) = U9_gaga(x3, x5) U10_gaga(x1, x2, x3, x4, x5) = U10_gaga(x3, x5) U11_gaga(x1, x2, x3, x4, x5, x6) = U11_gaga(x3, x5, x6) U12_gaga(x1, x2, x3, x4, x5, x6) = U12_gaga(x3, x5, x6) U13_gaga(x1, x2, x3, x4, x5) = U13_gaga(x5) U12_gaag(x1, x2, x3, x4, x5, x6) = U12_gaag(x4, x5, x6) move_in_gaaa(x1, x2, x3, x4) = move_in_gaaa(x1) U1_gaaa(x1, x2, x3, x4) = U1_gaaa(x4) U2_gaaa(x1, x2, x3, x4) = U2_gaaa(x4) U3_gaaa(x1, x2, x3, x4) = U3_gaaa(x4) U4_gaaa(x1, x2, x3, x4) = U4_gaaa(x4) U5_gaaa(x1, x2, x3, x4) = U5_gaaa(x4) move_out_gaaa(x1, x2, x3, x4) = move_out_gaaa U6_gaaa(x1, x2, x3, x4, x5) = U6_gaaa(x1, x5) U7_gaaa(x1, x2, x3, x4, x5, x6) = U7_gaaa(x1, x5, x6) U8_gaaa(x1, x2, x3, x4, x5, x6, x7) = U8_gaaa(x1, x7) U9_gaaa(x1, x2, x3, x4, x5) = U9_gaaa(x5) U10_gaaa(x1, x2, x3, x4, x5) = U10_gaaa(x5) U11_gaaa(x1, x2, x3, x4, x5, x6) = U11_gaaa(x5, x6) U12_gaaa(x1, x2, x3, x4, x5, x6) = U12_gaaa(x5, x6) U13_gaaa(x1, x2, x3, x4, x5) = U13_gaaa(x5) U13_gaag(x1, x2, x3, x4, x5) = U13_gaag(x5) U13_ggag(x1, x2, x3, x4, x5) = U13_ggag(x5) U12_ggga(x1, x2, x3, x4, x5, x6) = U12_ggga(x2, x3, x5, x6) U13_ggga(x1, x2, x3, x4, x5) = U13_ggga(x5) move_in_gagg(x1, x2, x3, x4) = move_in_gagg(x1, x3, x4) U1_gagg(x1, x2, x3, x4) = U1_gagg(x2, x4) U2_gagg(x1, x2, x3, x4) = U2_gagg(x2, x4) U3_gagg(x1, x2, x3, x4) = U3_gagg(x2, x4) U4_gagg(x1, x2, x3, x4) = U4_gagg(x4) U5_gagg(x1, x2, x3, x4) = U5_gagg(x4) move_out_gagg(x1, x2, x3, x4) = move_out_gagg U6_gagg(x1, x2, x3, x4, x5) = U6_gagg(x1, x3, x4, x5) U7_gagg(x1, x2, x3, x4, x5, x6) = U7_gagg(x1, x3, x4, x5, x6) U8_gagg(x1, x2, x3, x4, x5, x6, x7) = U8_gagg(x1, x3, x4, x7) U9_gagg(x1, x2, x3, x4, x5) = U9_gagg(x3, x4, x5) U10_gagg(x1, x2, x3, x4, x5) = U10_gagg(x3, x4, x5) U11_gagg(x1, x2, x3, x4, x5, x6) = U11_gagg(x3, x4, x5, x6) U12_gagg(x1, x2, x3, x4, x5, x6) = U12_gagg(x3, x4, x5, x6) U13_gagg(x1, x2, x3, x4, x5) = U13_gagg(x5) U13_gggg(x1, x2, x3, x4, x5) = U13_gggg(x5) MOVE_IN_GGGG(x1, x2, x3, x4) = MOVE_IN_GGGG(x1, x2, x3, x4) U1_GGGG(x1, x2, x3, x4) = U1_GGGG(x1, x2, x4) WRITE_IN_G(x1) = WRITE_IN_G(x1) U2_GGGG(x1, x2, x3, x4) = U2_GGGG(x2, x4) U3_GGGG(x1, x2, x3, x4) = U3_GGGG(x2, x4) U4_GGGG(x1, x2, x3, x4) = U4_GGGG(x4) U5_GGGG(x1, x2, x3, x4) = U5_GGGG(x4) NL_IN_ = NL_IN_ U6_GGGG(x1, x2, x3, x4, x5) = U6_GGGG(x1, x2, x3, x4, x5) =_IN_AG(x1, x2) = =_IN_AG(x2) U7_GGGG(x1, x2, x3, x4, x5, x6) = U7_GGGG(x1, x2, x3, x4, x5, x6) U8_GGGG(x1, x2, x3, x4, x5, x6, x7) = U8_GGGG(x1, x2, x3, x4, x7) ISGREATER_IN_GG(x1, x2) = ISGREATER_IN_GG(x1, x2) U47_GG(x1, x2, x3) = U47_GG(x3) U48_GG(x1, x2, x3) = U48_GG(x3) U9_GGGG(x1, x2, x3, x4, x5) = U9_GGGG(x2, x3, x4, x5) ISMINUS_IN_GGA(x1, x2, x3) = ISMINUS_IN_GGA(x1, x2) U18_GGA(x1, x2, x3) = U18_GGA(x3) U19_GGA(x1, x2, x3) = U19_GGA(x3) U20_GGA(x1, x2, x3, x4) = U20_GGA(x4) U21_GGA(x1, x2, x3, x4) = U21_GGA(x4) U22_GGA(x1, x2, x3, x4) = U22_GGA(x4) U23_GGA(x1, x2, x3, x4) = U23_GGA(x4) U10_GGGG(x1, x2, x3, x4, x5) = U10_GGGG(x2, x3, x4, x5) U11_GGGG(x1, x2, x3, x4, x5, x6) = U11_GGGG(x2, x3, x4, x5, x6) U12_GGGG(x1, x2, x3, x4, x5, x6) = U12_GGGG(x2, x3, x4, x5, x6) MOVE_IN_GGGA(x1, x2, x3, x4) = MOVE_IN_GGGA(x1, x2, x3) U1_GGGA(x1, x2, x3, x4) = U1_GGGA(x1, x2, x4) U2_GGGA(x1, x2, x3, x4) = U2_GGGA(x2, x4) U3_GGGA(x1, x2, x3, x4) = U3_GGGA(x2, x4) U4_GGGA(x1, x2, x3, x4) = U4_GGGA(x4) U5_GGGA(x1, x2, x3, x4) = U5_GGGA(x4) U6_GGGA(x1, x2, x3, x4, x5) = U6_GGGA(x1, x2, x3, x5) U7_GGGA(x1, x2, x3, x4, x5, x6) = U7_GGGA(x1, x2, x3, x5, x6) U8_GGGA(x1, x2, x3, x4, x5, x6, x7) = U8_GGGA(x1, x2, x3, x7) U9_GGGA(x1, x2, x3, x4, x5) = U9_GGGA(x2, x3, x5) U10_GGGA(x1, x2, x3, x4, x5) = U10_GGGA(x2, x3, x5) U11_GGGA(x1, x2, x3, x4, x5, x6) = U11_GGGA(x2, x3, x5, x6) MOVE_IN_GGAG(x1, x2, x3, x4) = MOVE_IN_GGAG(x1, x2, x4) U1_GGAG(x1, x2, x3, x4) = U1_GGAG(x1, x4) U2_GGAG(x1, x2, x3, x4) = U2_GGAG(x4) U3_GGAG(x1, x2, x3, x4) = U3_GGAG(x4) U4_GGAG(x1, x2, x3, x4) = U4_GGAG(x4) WRITE_IN_A(x1) = WRITE_IN_A U5_GGAG(x1, x2, x3, x4) = U5_GGAG(x4) U6_GGAG(x1, x2, x3, x4, x5) = U6_GGAG(x1, x2, x4, x5) U7_GGAG(x1, x2, x3, x4, x5, x6) = U7_GGAG(x1, x2, x4, x5, x6) U8_GGAG(x1, x2, x3, x4, x5, x6, x7) = U8_GGAG(x1, x2, x4, x7) U9_GGAG(x1, x2, x3, x4, x5) = U9_GGAG(x2, x4, x5) U10_GGAG(x1, x2, x3, x4, x5) = U10_GGAG(x2, x4, x5) U11_GGAG(x1, x2, x3, x4, x5, x6) = U11_GGAG(x2, x4, x5, x6) U12_GGAG(x1, x2, x3, x4, x5, x6) = U12_GGAG(x2, x4, x5, x6) MOVE_IN_GGAA(x1, x2, x3, x4) = MOVE_IN_GGAA(x1, x2) U1_GGAA(x1, x2, x3, x4) = U1_GGAA(x1, x4) U2_GGAA(x1, x2, x3, x4) = U2_GGAA(x4) U3_GGAA(x1, x2, x3, x4) = U3_GGAA(x4) U4_GGAA(x1, x2, x3, x4) = U4_GGAA(x4) U5_GGAA(x1, x2, x3, x4) = U5_GGAA(x4) U6_GGAA(x1, x2, x3, x4, x5) = U6_GGAA(x1, x2, x5) U7_GGAA(x1, x2, x3, x4, x5, x6) = U7_GGAA(x1, x2, x5, x6) U8_GGAA(x1, x2, x3, x4, x5, x6, x7) = U8_GGAA(x1, x2, x7) U9_GGAA(x1, x2, x3, x4, x5) = U9_GGAA(x2, x5) U10_GGAA(x1, x2, x3, x4, x5) = U10_GGAA(x2, x5) U11_GGAA(x1, x2, x3, x4, x5, x6) = U11_GGAA(x2, x5, x6) U12_GGAA(x1, x2, x3, x4, x5, x6) = U12_GGAA(x2, x5, x6) U13_GGAA(x1, x2, x3, x4, x5) = U13_GGAA(x5) MOVE_IN_GAAG(x1, x2, x3, x4) = MOVE_IN_GAAG(x1, x4) U1_GAAG(x1, x2, x3, x4) = U1_GAAG(x4) U2_GAAG(x1, x2, x3, x4) = U2_GAAG(x4) U3_GAAG(x1, x2, x3, x4) = U3_GAAG(x4) U4_GAAG(x1, x2, x3, x4) = U4_GAAG(x4) U5_GAAG(x1, x2, x3, x4) = U5_GAAG(x4) U6_GAAG(x1, x2, x3, x4, x5) = U6_GAAG(x1, x4, x5) U7_GAAG(x1, x2, x3, x4, x5, x6) = U7_GAAG(x1, x4, x5, x6) U8_GAAG(x1, x2, x3, x4, x5, x6, x7) = U8_GAAG(x1, x4, x7) U9_GAAG(x1, x2, x3, x4, x5) = U9_GAAG(x4, x5) U10_GAAG(x1, x2, x3, x4, x5) = U10_GAAG(x4, x5) U11_GAAG(x1, x2, x3, x4, x5, x6) = U11_GAAG(x4, x5, x6) MOVE_IN_GAGA(x1, x2, x3, x4) = MOVE_IN_GAGA(x1, x3) U1_GAGA(x1, x2, x3, x4) = U1_GAGA(x2, x4) U2_GAGA(x1, x2, x3, x4) = U2_GAGA(x2, x4) U3_GAGA(x1, x2, x3, x4) = U3_GAGA(x2, x4) U4_GAGA(x1, x2, x3, x4) = U4_GAGA(x4) U5_GAGA(x1, x2, x3, x4) = U5_GAGA(x4) U6_GAGA(x1, x2, x3, x4, x5) = U6_GAGA(x1, x3, x5) U7_GAGA(x1, x2, x3, x4, x5, x6) = U7_GAGA(x1, x3, x5, x6) U8_GAGA(x1, x2, x3, x4, x5, x6, x7) = U8_GAGA(x1, x3, x7) U9_GAGA(x1, x2, x3, x4, x5) = U9_GAGA(x3, x5) U10_GAGA(x1, x2, x3, x4, x5) = U10_GAGA(x3, x5) U11_GAGA(x1, x2, x3, x4, x5, x6) = U11_GAGA(x3, x5, x6) U12_GAGA(x1, x2, x3, x4, x5, x6) = U12_GAGA(x3, x5, x6) U13_GAGA(x1, x2, x3, x4, x5) = U13_GAGA(x5) U12_GAAG(x1, x2, x3, x4, x5, x6) = U12_GAAG(x4, x5, x6) MOVE_IN_GAAA(x1, x2, x3, x4) = MOVE_IN_GAAA(x1) U1_GAAA(x1, x2, x3, x4) = U1_GAAA(x4) U2_GAAA(x1, x2, x3, x4) = U2_GAAA(x4) U3_GAAA(x1, x2, x3, x4) = U3_GAAA(x4) U4_GAAA(x1, x2, x3, x4) = U4_GAAA(x4) U5_GAAA(x1, x2, x3, x4) = U5_GAAA(x4) U6_GAAA(x1, x2, x3, x4, x5) = U6_GAAA(x1, x5) U7_GAAA(x1, x2, x3, x4, x5, x6) = U7_GAAA(x1, x5, x6) U8_GAAA(x1, x2, x3, x4, x5, x6, x7) = U8_GAAA(x1, x7) U9_GAAA(x1, x2, x3, x4, x5) = U9_GAAA(x5) U10_GAAA(x1, x2, x3, x4, x5) = U10_GAAA(x5) U11_GAAA(x1, x2, x3, x4, x5, x6) = U11_GAAA(x5, x6) U12_GAAA(x1, x2, x3, x4, x5, x6) = U12_GAAA(x5, x6) U13_GAAA(x1, x2, x3, x4, x5) = U13_GAAA(x5) U13_GAAG(x1, x2, x3, x4, x5) = U13_GAAG(x5) U13_GGAG(x1, x2, x3, x4, x5) = U13_GGAG(x5) U12_GGGA(x1, x2, x3, x4, x5, x6) = U12_GGGA(x2, x3, x5, x6) U13_GGGA(x1, x2, x3, x4, x5) = U13_GGGA(x5) MOVE_IN_GAGG(x1, x2, x3, x4) = MOVE_IN_GAGG(x1, x3, x4) U1_GAGG(x1, x2, x3, x4) = U1_GAGG(x2, x4) U2_GAGG(x1, x2, x3, x4) = U2_GAGG(x2, x4) U3_GAGG(x1, x2, x3, x4) = U3_GAGG(x2, x4) U4_GAGG(x1, x2, x3, x4) = U4_GAGG(x4) U5_GAGG(x1, x2, x3, x4) = U5_GAGG(x4) U6_GAGG(x1, x2, x3, x4, x5) = U6_GAGG(x1, x3, x4, x5) U7_GAGG(x1, x2, x3, x4, x5, x6) = U7_GAGG(x1, x3, x4, x5, x6) U8_GAGG(x1, x2, x3, x4, x5, x6, x7) = U8_GAGG(x1, x3, x4, x7) U9_GAGG(x1, x2, x3, x4, x5) = U9_GAGG(x3, x4, x5) U10_GAGG(x1, x2, x3, x4, x5) = U10_GAGG(x3, x4, x5) U11_GAGG(x1, x2, x3, x4, x5, x6) = U11_GAGG(x3, x4, x5, x6) U12_GAGG(x1, x2, x3, x4, x5, x6) = U12_GAGG(x3, x4, x5, x6) U13_GAGG(x1, x2, x3, x4, x5) = U13_GAGG(x5) U13_GGGG(x1, x2, x3, x4, x5) = U13_GGGG(x5) We have to consider all (P,R,Pi)-chains ---------------------------------------- (10) Obligation: Pi DP problem: The TRS P consists of the following rules: MOVE_IN_GGGG(succ(zero), X, Y, X1) -> U1_GGGG(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GGGG(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GGGG(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GGGG(X, Y, X1, write_in_g(X)) U1_GGGG(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_G(X) U2_GGGG(X, Y, X1, write_out_g(X)) -> U3_GGGG(X, Y, X1, write_in_g(' to ')) U2_GGGG(X, Y, X1, write_out_g(X)) -> WRITE_IN_G(' to ') U3_GGGG(X, Y, X1, write_out_g(' to ')) -> U4_GGGG(X, Y, X1, write_in_g(Y)) U3_GGGG(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_G(Y) U4_GGGG(X, Y, X1, write_out_g(Y)) -> U5_GGGG(X, Y, X1, nl_in_) U4_GGGG(X, Y, X1, write_out_g(Y)) -> NL_IN_ MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GGGG(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GGGG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGGG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GGGG(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GGGG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGGG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GGGG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) ISGREATER_IN_GG(succ(X), succ(Y)) -> U47_GG(X, Y, isGreater_in_gg(X, Y)) ISGREATER_IN_GG(succ(X), succ(Y)) -> ISGREATER_IN_GG(X, Y) ISGREATER_IN_GG(pred(X), pred(Y)) -> U48_GG(X, Y, isGreater_in_gg(X, Y)) ISGREATER_IN_GG(pred(X), pred(Y)) -> ISGREATER_IN_GG(X, Y) U8_GGGG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGGG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GGGG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) ISMINUS_IN_GGA(zero, succ(Y), pred(Z)) -> U18_GGA(Y, Z, isMinus_in_gga(zero, Y, Z)) ISMINUS_IN_GGA(zero, succ(Y), pred(Z)) -> ISMINUS_IN_GGA(zero, Y, Z) ISMINUS_IN_GGA(zero, pred(Y), succ(Z)) -> U19_GGA(Y, Z, isMinus_in_gga(zero, Y, Z)) ISMINUS_IN_GGA(zero, pred(Y), succ(Z)) -> ISMINUS_IN_GGA(zero, Y, Z) ISMINUS_IN_GGA(succ(X), succ(Y), Z) -> U20_GGA(X, Y, Z, isMinus_in_gga(X, Y, Z)) ISMINUS_IN_GGA(succ(X), succ(Y), Z) -> ISMINUS_IN_GGA(X, Y, Z) ISMINUS_IN_GGA(succ(X), pred(Y), succ(succ(Z))) -> U21_GGA(X, Y, Z, isMinus_in_gga(X, Y, Z)) ISMINUS_IN_GGA(succ(X), pred(Y), succ(succ(Z))) -> ISMINUS_IN_GGA(X, Y, Z) ISMINUS_IN_GGA(pred(X), succ(Y), pred(pred(Z))) -> U22_GGA(X, Y, Z, isMinus_in_gga(X, Y, Z)) ISMINUS_IN_GGA(pred(X), succ(Y), pred(pred(Z))) -> ISMINUS_IN_GGA(X, Y, Z) ISMINUS_IN_GGA(pred(X), pred(Y), Z) -> U23_GGA(X, Y, Z, isMinus_in_gga(X, Y, Z)) ISMINUS_IN_GGA(pred(X), pred(Y), Z) -> ISMINUS_IN_GGA(X, Y, Z) U9_GGGG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGGG(N, X, Y, Z, =_in_ag(M, U)) U9_GGGG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GGGG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGGG(N, X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U10_GGGG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGGG(M, X, Z, Y) U11_GGGG(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> U12_GGGG(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U11_GGGG(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> MOVE_IN_GGGA(succ(zero), X, Y, X2) MOVE_IN_GGGA(succ(zero), X, Y, X1) -> U1_GGGA(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GGGA(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GGGA(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GGGA(X, Y, X1, write_in_g(X)) U1_GGGA(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_G(X) U2_GGGA(X, Y, X1, write_out_g(X)) -> U3_GGGA(X, Y, X1, write_in_g(' to ')) U2_GGGA(X, Y, X1, write_out_g(X)) -> WRITE_IN_G(' to ') U3_GGGA(X, Y, X1, write_out_g(' to ')) -> U4_GGGA(X, Y, X1, write_in_g(Y)) U3_GGGA(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_G(Y) U4_GGGA(X, Y, X1, write_out_g(Y)) -> U5_GGGA(X, Y, X1, nl_in_) U4_GGGA(X, Y, X1, write_out_g(Y)) -> NL_IN_ MOVE_IN_GGGA(N, X, Y, Z) -> U6_GGGA(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GGGA(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GGGA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGGA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GGGA(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GGGA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGGA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GGGA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) U8_GGGA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGGA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GGGA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) U9_GGGA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGGA(N, X, Y, Z, =_in_ag(M, U)) U9_GGGA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GGGA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGGA(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) U10_GGGA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGAG(M, X, Z, Y) MOVE_IN_GGAG(succ(zero), X, Y, X1) -> U1_GGAG(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GGAG(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GGAG(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GGAG(X, Y, X1, write_in_g(X)) U1_GGAG(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_G(X) U2_GGAG(X, Y, X1, write_out_g(X)) -> U3_GGAG(X, Y, X1, write_in_g(' to ')) U2_GGAG(X, Y, X1, write_out_g(X)) -> WRITE_IN_G(' to ') U3_GGAG(X, Y, X1, write_out_g(' to ')) -> U4_GGAG(X, Y, X1, write_in_a(Y)) U3_GGAG(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_A(Y) U4_GGAG(X, Y, X1, write_out_a(Y)) -> U5_GGAG(X, Y, X1, nl_in_) U4_GGAG(X, Y, X1, write_out_a(Y)) -> NL_IN_ MOVE_IN_GGAG(N, X, Y, Z) -> U6_GGAG(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GGAG(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GGAG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGAG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GGAG(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GGAG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGAG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GGAG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) U8_GGAG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGAG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GGAG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) U9_GGAG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGAG(N, X, Y, Z, =_in_ag(M, U)) U9_GGAG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GGAG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGAG(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U10_GGAG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGGA(M, X, Z, Y) U11_GGAG(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_GGAG(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U11_GGAG(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> MOVE_IN_GGAA(succ(zero), X, Y, X2) MOVE_IN_GGAA(succ(zero), X, Y, X1) -> U1_GGAA(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GGAA(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GGAA(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GGAA(X, Y, X1, write_in_g(X)) U1_GGAA(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_G(X) U2_GGAA(X, Y, X1, write_out_g(X)) -> U3_GGAA(X, Y, X1, write_in_g(' to ')) U2_GGAA(X, Y, X1, write_out_g(X)) -> WRITE_IN_G(' to ') U3_GGAA(X, Y, X1, write_out_g(' to ')) -> U4_GGAA(X, Y, X1, write_in_a(Y)) U3_GGAA(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_A(Y) U4_GGAA(X, Y, X1, write_out_a(Y)) -> U5_GGAA(X, Y, X1, nl_in_) U4_GGAA(X, Y, X1, write_out_a(Y)) -> NL_IN_ MOVE_IN_GGAA(N, X, Y, Z) -> U6_GGAA(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GGAA(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GGAA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGAA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GGAA(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GGAA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGAA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GGAA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) U8_GGAA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGAA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GGAA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) U9_GGAA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGAA(N, X, Y, Z, =_in_ag(M, U)) U9_GGAA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GGAA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGAA(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U10_GGAA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGAA(M, X, Z, Y) U11_GGAA(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_GGAA(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U11_GGAA(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> MOVE_IN_GGAA(succ(zero), X, Y, X2) U12_GGAA(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_GGAA(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) U12_GGAA(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> MOVE_IN_GAAG(M, Z, Y, X) MOVE_IN_GAAG(succ(zero), X, Y, X1) -> U1_GAAG(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GAAG(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GAAG(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GAAG(X, Y, X1, write_in_a(X)) U1_GAAG(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_A(X) U2_GAAG(X, Y, X1, write_out_a(X)) -> U3_GAAG(X, Y, X1, write_in_g(' to ')) U2_GAAG(X, Y, X1, write_out_a(X)) -> WRITE_IN_G(' to ') U3_GAAG(X, Y, X1, write_out_g(' to ')) -> U4_GAAG(X, Y, X1, write_in_a(Y)) U3_GAAG(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_A(Y) U4_GAAG(X, Y, X1, write_out_a(Y)) -> U5_GAAG(X, Y, X1, nl_in_) U4_GAAG(X, Y, X1, write_out_a(Y)) -> NL_IN_ MOVE_IN_GAAG(N, X, Y, Z) -> U6_GAAG(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GAAG(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GAAG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAAG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GAAG(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GAAG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAAG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GAAG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) U8_GAAG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAAG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GAAG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) U9_GAAG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAAG(N, X, Y, Z, =_in_ag(M, U)) U9_GAAG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GAAG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAAG(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) U10_GAAG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAGA(M, X, Z, Y) MOVE_IN_GAGA(succ(zero), X, Y, X1) -> U1_GAGA(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GAGA(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GAGA(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GAGA(X, Y, X1, write_in_a(X)) U1_GAGA(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_A(X) U2_GAGA(X, Y, X1, write_out_a(X)) -> U3_GAGA(X, Y, X1, write_in_g(' to ')) U2_GAGA(X, Y, X1, write_out_a(X)) -> WRITE_IN_G(' to ') U3_GAGA(X, Y, X1, write_out_g(' to ')) -> U4_GAGA(X, Y, X1, write_in_g(Y)) U3_GAGA(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_G(Y) U4_GAGA(X, Y, X1, write_out_g(Y)) -> U5_GAGA(X, Y, X1, nl_in_) U4_GAGA(X, Y, X1, write_out_g(Y)) -> NL_IN_ MOVE_IN_GAGA(N, X, Y, Z) -> U6_GAGA(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GAGA(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GAGA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAGA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GAGA(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GAGA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAGA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GAGA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) U8_GAGA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAGA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GAGA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) U9_GAGA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAGA(N, X, Y, Z, =_in_ag(M, U)) U9_GAGA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GAGA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAGA(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U10_GAGA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAAG(M, X, Z, Y) U11_GAGA(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_GAGA(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U11_GAGA(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> MOVE_IN_GAGA(succ(zero), X, Y, X2) U12_GAGA(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_GAGA(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U12_GAGA(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> MOVE_IN_GAGA(M, Z, Y, X) U11_GAAG(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_GAAG(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U11_GAAG(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> MOVE_IN_GAAA(succ(zero), X, Y, X2) MOVE_IN_GAAA(succ(zero), X, Y, X1) -> U1_GAAA(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GAAA(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GAAA(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GAAA(X, Y, X1, write_in_a(X)) U1_GAAA(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_A(X) U2_GAAA(X, Y, X1, write_out_a(X)) -> U3_GAAA(X, Y, X1, write_in_g(' to ')) U2_GAAA(X, Y, X1, write_out_a(X)) -> WRITE_IN_G(' to ') U3_GAAA(X, Y, X1, write_out_g(' to ')) -> U4_GAAA(X, Y, X1, write_in_a(Y)) U3_GAAA(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_A(Y) U4_GAAA(X, Y, X1, write_out_a(Y)) -> U5_GAAA(X, Y, X1, nl_in_) U4_GAAA(X, Y, X1, write_out_a(Y)) -> NL_IN_ MOVE_IN_GAAA(N, X, Y, Z) -> U6_GAAA(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GAAA(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GAAA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAAA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GAAA(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GAAA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAAA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GAAA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) U8_GAAA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAAA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GAAA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) U9_GAAA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAAA(N, X, Y, Z, =_in_ag(M, U)) U9_GAAA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GAAA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAAA(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U10_GAAA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAAA(M, X, Z, Y) U11_GAAA(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_GAAA(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U11_GAAA(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> MOVE_IN_GAAA(succ(zero), X, Y, X2) U12_GAAA(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_GAAA(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U12_GAAA(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> MOVE_IN_GAAA(M, Z, Y, X) U12_GAAG(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_GAAG(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) U12_GAAG(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> MOVE_IN_GGAA(M, Z, Y, X) U12_GGAG(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_GGAG(N, X, Y, Z, move_in_ggag(M, Z, Y, X)) U12_GGAG(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> MOVE_IN_GGAG(M, Z, Y, X) U11_GGGA(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_GGGA(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U11_GGGA(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> MOVE_IN_GGGA(succ(zero), X, Y, X2) U12_GGGA(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_GGGA(N, X, Y, Z, move_in_gagg(M, Z, Y, X)) U12_GGGA(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> MOVE_IN_GAGG(M, Z, Y, X) MOVE_IN_GAGG(succ(zero), X, Y, X1) -> U1_GAGG(X, Y, X1, write_in_g('Move top disk from ')) MOVE_IN_GAGG(succ(zero), X, Y, X1) -> WRITE_IN_G('Move top disk from ') U1_GAGG(X, Y, X1, write_out_g('Move top disk from ')) -> U2_GAGG(X, Y, X1, write_in_a(X)) U1_GAGG(X, Y, X1, write_out_g('Move top disk from ')) -> WRITE_IN_A(X) U2_GAGG(X, Y, X1, write_out_a(X)) -> U3_GAGG(X, Y, X1, write_in_g(' to ')) U2_GAGG(X, Y, X1, write_out_a(X)) -> WRITE_IN_G(' to ') U3_GAGG(X, Y, X1, write_out_g(' to ')) -> U4_GAGG(X, Y, X1, write_in_g(Y)) U3_GAGG(X, Y, X1, write_out_g(' to ')) -> WRITE_IN_G(Y) U4_GAGG(X, Y, X1, write_out_g(Y)) -> U5_GAGG(X, Y, X1, nl_in_) U4_GAGG(X, Y, X1, write_out_g(Y)) -> NL_IN_ MOVE_IN_GAGG(N, X, Y, Z) -> U6_GAGG(N, X, Y, Z, =_in_ag(X1, N)) MOVE_IN_GAGG(N, X, Y, Z) -> =_IN_AG(X1, N) U6_GAGG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAGG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U6_GAGG(N, X, Y, Z, =_out_ag(X1, N)) -> =_IN_AG(X3, succ(zero)) U7_GAGG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAGG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U7_GAGG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> ISGREATER_IN_GG(X1, X3) U8_GAGG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAGG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U8_GAGG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> ISMINUS_IN_GGA(N, succ(zero), U) U9_GAGG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAGG(N, X, Y, Z, =_in_ag(M, U)) U9_GAGG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> =_IN_AG(M, U) U10_GAGG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAGG(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U10_GAGG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAGG(M, X, Z, Y) U11_GAGG(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_GAGG(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U11_GAGG(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> MOVE_IN_GAGA(succ(zero), X, Y, X2) U12_GAGG(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_GAGG(N, X, Y, Z, move_in_ggga(M, Z, Y, X)) U12_GAGG(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> MOVE_IN_GGGA(M, Z, Y, X) U12_GGGG(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_GGGG(N, X, Y, Z, move_in_gggg(M, Z, Y, X)) U12_GGGG(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> MOVE_IN_GGGG(M, Z, Y, X) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, X1, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g(X0) U1_gggg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gggg(X, Y, X1, write_in_g(X)) U2_gggg(X, Y, X1, write_out_g(X)) -> U3_gggg(X, Y, X1, write_in_g(' to ')) U3_gggg(X, Y, X1, write_out_g(' to ')) -> U4_gggg(X, Y, X1, write_in_g(Y)) U4_gggg(X, Y, X1, write_out_g(Y)) -> U5_gggg(X, Y, X1, nl_in_) nl_in_ -> nl_out_ U5_gggg(X, Y, X1, nl_out_) -> move_out_gggg(succ(zero), X, Y, X1) move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(X1, N)) =_in_ag(X, X) -> =_out_ag(X, X) U6_gggg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gggg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg(succ(X), zero) isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg(succ(X), pred(Y)) isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(X, Y, isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg(zero, pred(Y)) isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(X, Y, isGreater_in_gg(X, Y)) U48_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U47_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U8_gggg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gggg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) isMinus_in_gga(X, zero, X) -> isMinus_out_gga(X, zero, X) isMinus_in_gga(zero, succ(Y), pred(Z)) -> U18_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(zero, pred(Y), succ(Z)) -> U19_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), succ(Y), Z) -> U20_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(succ(X), pred(Y), succ(succ(Z))) -> U21_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), succ(Y), pred(pred(Z))) -> U22_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), pred(Y), Z) -> U23_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) U23_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), pred(Y), Z) U22_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), succ(Y), pred(pred(Z))) U21_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), pred(Y), succ(succ(Z))) U20_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), succ(Y), Z) U19_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, pred(Y), succ(Z)) U18_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, succ(Y), pred(Z)) U9_gggg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gggg(N, X, Y, Z, =_in_ag(M, U)) U10_gggg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gggg(N, X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> U12_gggg(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) move_in_ggga(succ(zero), X, Y, X1) -> U1_ggga(X, Y, X1, write_in_g('Move top disk from ')) U1_ggga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggga(X, Y, X1, write_in_g(X)) U2_ggga(X, Y, X1, write_out_g(X)) -> U3_ggga(X, Y, X1, write_in_g(' to ')) U3_ggga(X, Y, X1, write_out_g(' to ')) -> U4_ggga(X, Y, X1, write_in_g(Y)) U4_ggga(X, Y, X1, write_out_g(Y)) -> U5_ggga(X, Y, X1, nl_in_) U5_ggga(X, Y, X1, nl_out_) -> move_out_ggga(succ(zero), X, Y, X1) move_in_ggga(N, X, Y, Z) -> U6_ggga(N, X, Y, Z, =_in_ag(X1, N)) U6_ggga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggga(N, X, Y, Z, =_in_ag(M, U)) U10_ggga(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggga(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) move_in_ggag(succ(zero), X, Y, X1) -> U1_ggag(X, Y, X1, write_in_g('Move top disk from ')) U1_ggag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggag(X, Y, X1, write_in_g(X)) U2_ggag(X, Y, X1, write_out_g(X)) -> U3_ggag(X, Y, X1, write_in_g(' to ')) U3_ggag(X, Y, X1, write_out_g(' to ')) -> U4_ggag(X, Y, X1, write_in_a(Y)) write_in_a(X0) -> write_out_a(X0) U4_ggag(X, Y, X1, write_out_a(Y)) -> U5_ggag(X, Y, X1, nl_in_) U5_ggag(X, Y, X1, nl_out_) -> move_out_ggag(succ(zero), X, Y, X1) move_in_ggag(N, X, Y, Z) -> U6_ggag(N, X, Y, Z, =_in_ag(X1, N)) U6_ggag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggag(N, X, Y, Z, =_in_ag(M, U)) U10_ggag(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggag(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U11_ggag(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_ggag(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) move_in_ggaa(succ(zero), X, Y, X1) -> U1_ggaa(X, Y, X1, write_in_g('Move top disk from ')) U1_ggaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggaa(X, Y, X1, write_in_g(X)) U2_ggaa(X, Y, X1, write_out_g(X)) -> U3_ggaa(X, Y, X1, write_in_g(' to ')) U3_ggaa(X, Y, X1, write_out_g(' to ')) -> U4_ggaa(X, Y, X1, write_in_a(Y)) U4_ggaa(X, Y, X1, write_out_a(Y)) -> U5_ggaa(X, Y, X1, nl_in_) U5_ggaa(X, Y, X1, nl_out_) -> move_out_ggaa(succ(zero), X, Y, X1) move_in_ggaa(N, X, Y, Z) -> U6_ggaa(N, X, Y, Z, =_in_ag(X1, N)) U6_ggaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggaa(N, X, Y, Z, =_in_ag(M, U)) U10_ggaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggaa(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U11_ggaa(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_ggaa(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_ggaa(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggaa(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) move_in_gaag(succ(zero), X, Y, X1) -> U1_gaag(X, Y, X1, write_in_g('Move top disk from ')) U1_gaag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaag(X, Y, X1, write_in_a(X)) U2_gaag(X, Y, X1, write_out_a(X)) -> U3_gaag(X, Y, X1, write_in_g(' to ')) U3_gaag(X, Y, X1, write_out_g(' to ')) -> U4_gaag(X, Y, X1, write_in_a(Y)) U4_gaag(X, Y, X1, write_out_a(Y)) -> U5_gaag(X, Y, X1, nl_in_) U5_gaag(X, Y, X1, nl_out_) -> move_out_gaag(succ(zero), X, Y, X1) move_in_gaag(N, X, Y, Z) -> U6_gaag(N, X, Y, Z, =_in_ag(X1, N)) U6_gaag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaag(N, X, Y, Z, =_in_ag(M, U)) U10_gaag(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaag(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) move_in_gaga(succ(zero), X, Y, X1) -> U1_gaga(X, Y, X1, write_in_g('Move top disk from ')) U1_gaga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaga(X, Y, X1, write_in_a(X)) U2_gaga(X, Y, X1, write_out_a(X)) -> U3_gaga(X, Y, X1, write_in_g(' to ')) U3_gaga(X, Y, X1, write_out_g(' to ')) -> U4_gaga(X, Y, X1, write_in_g(Y)) U4_gaga(X, Y, X1, write_out_g(Y)) -> U5_gaga(X, Y, X1, nl_in_) U5_gaga(X, Y, X1, nl_out_) -> move_out_gaga(succ(zero), X, Y, X1) move_in_gaga(N, X, Y, Z) -> U6_gaga(N, X, Y, Z, =_in_ag(X1, N)) U6_gaga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaga(N, X, Y, Z, =_in_ag(M, U)) U10_gaga(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaga(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U11_gaga(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_gaga(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gaga(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gaga(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U13_gaga(N, X, Y, Z, move_out_gaga(M, Z, Y, X)) -> move_out_gaga(N, X, Y, Z) U11_gaag(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_gaag(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) move_in_gaaa(succ(zero), X, Y, X1) -> U1_gaaa(X, Y, X1, write_in_g('Move top disk from ')) U1_gaaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaaa(X, Y, X1, write_in_a(X)) U2_gaaa(X, Y, X1, write_out_a(X)) -> U3_gaaa(X, Y, X1, write_in_g(' to ')) U3_gaaa(X, Y, X1, write_out_g(' to ')) -> U4_gaaa(X, Y, X1, write_in_a(Y)) U4_gaaa(X, Y, X1, write_out_a(Y)) -> U5_gaaa(X, Y, X1, nl_in_) U5_gaaa(X, Y, X1, nl_out_) -> move_out_gaaa(succ(zero), X, Y, X1) move_in_gaaa(N, X, Y, Z) -> U6_gaaa(N, X, Y, Z, =_in_ag(X1, N)) U6_gaaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaaa(N, X, Y, Z, =_in_ag(M, U)) U10_gaaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaaa(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U11_gaaa(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_gaaa(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_gaaa(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaaa(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U13_gaaa(N, X, Y, Z, move_out_gaaa(M, Z, Y, X)) -> move_out_gaaa(N, X, Y, Z) U12_gaag(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaag(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) U13_gaag(N, X, Y, Z, move_out_ggaa(M, Z, Y, X)) -> move_out_gaag(N, X, Y, Z) U13_ggaa(N, X, Y, Z, move_out_gaag(M, Z, Y, X)) -> move_out_ggaa(N, X, Y, Z) U12_ggag(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggag(N, X, Y, Z, move_in_ggag(M, Z, Y, X)) U13_ggag(N, X, Y, Z, move_out_ggag(M, Z, Y, X)) -> move_out_ggag(N, X, Y, Z) U11_ggga(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_ggga(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U12_ggga(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_ggga(N, X, Y, Z, move_in_gagg(M, Z, Y, X)) move_in_gagg(succ(zero), X, Y, X1) -> U1_gagg(X, Y, X1, write_in_g('Move top disk from ')) U1_gagg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gagg(X, Y, X1, write_in_a(X)) U2_gagg(X, Y, X1, write_out_a(X)) -> U3_gagg(X, Y, X1, write_in_g(' to ')) U3_gagg(X, Y, X1, write_out_g(' to ')) -> U4_gagg(X, Y, X1, write_in_g(Y)) U4_gagg(X, Y, X1, write_out_g(Y)) -> U5_gagg(X, Y, X1, nl_in_) U5_gagg(X, Y, X1, nl_out_) -> move_out_gagg(succ(zero), X, Y, X1) move_in_gagg(N, X, Y, Z) -> U6_gagg(N, X, Y, Z, =_in_ag(X1, N)) U6_gagg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gagg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gagg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gagg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gagg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gagg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gagg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gagg(N, X, Y, Z, =_in_ag(M, U)) U10_gagg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gagg(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U11_gagg(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_gagg(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gagg(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gagg(N, X, Y, Z, move_in_ggga(M, Z, Y, X)) U13_gagg(N, X, Y, Z, move_out_ggga(M, Z, Y, X)) -> move_out_gagg(N, X, Y, Z) U13_ggga(N, X, Y, Z, move_out_gagg(M, Z, Y, X)) -> move_out_ggga(N, X, Y, Z) U12_gggg(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_gggg(N, X, Y, Z, move_in_gggg(M, Z, Y, X)) U13_gggg(N, X, Y, Z, move_out_gggg(M, Z, Y, X)) -> move_out_gggg(N, X, Y, Z) The argument filtering Pi contains the following mapping: move_in_gggg(x1, x2, x3, x4) = move_in_gggg(x1, x2, x3, x4) succ(x1) = succ(x1) zero = zero U1_gggg(x1, x2, x3, x4) = U1_gggg(x1, x2, x4) write_in_g(x1) = write_in_g(x1) write_out_g(x1) = write_out_g 'Move top disk from ' = 'Move top disk from ' U2_gggg(x1, x2, x3, x4) = U2_gggg(x2, x4) U3_gggg(x1, x2, x3, x4) = U3_gggg(x2, x4) ' to ' = ' to ' U4_gggg(x1, x2, x3, x4) = U4_gggg(x4) U5_gggg(x1, x2, x3, x4) = U5_gggg(x4) nl_in_ = nl_in_ nl_out_ = nl_out_ move_out_gggg(x1, x2, x3, x4) = move_out_gggg U6_gggg(x1, x2, x3, x4, x5) = U6_gggg(x1, x2, x3, x4, x5) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U7_gggg(x1, x2, x3, x4, x5, x6) = U7_gggg(x1, x2, x3, x4, x5, x6) U8_gggg(x1, x2, x3, x4, x5, x6, x7) = U8_gggg(x1, x2, x3, x4, x7) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U47_gg(x1, x2, x3) = U47_gg(x3) U48_gg(x1, x2, x3) = U48_gg(x3) U9_gggg(x1, x2, x3, x4, x5) = U9_gggg(x2, x3, x4, x5) isMinus_in_gga(x1, x2, x3) = isMinus_in_gga(x1, x2) isMinus_out_gga(x1, x2, x3) = isMinus_out_gga(x3) U18_gga(x1, x2, x3) = U18_gga(x3) U19_gga(x1, x2, x3) = U19_gga(x3) U20_gga(x1, x2, x3, x4) = U20_gga(x4) U21_gga(x1, x2, x3, x4) = U21_gga(x4) U22_gga(x1, x2, x3, x4) = U22_gga(x4) U23_gga(x1, x2, x3, x4) = U23_gga(x4) U10_gggg(x1, x2, x3, x4, x5) = U10_gggg(x2, x3, x4, x5) U11_gggg(x1, x2, x3, x4, x5, x6) = U11_gggg(x2, x3, x4, x5, x6) U12_gggg(x1, x2, x3, x4, x5, x6) = U12_gggg(x2, x3, x4, x5, x6) move_in_ggga(x1, x2, x3, x4) = move_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4) = U1_ggga(x1, x2, x4) U2_ggga(x1, x2, x3, x4) = U2_ggga(x2, x4) U3_ggga(x1, x2, x3, x4) = U3_ggga(x2, x4) U4_ggga(x1, x2, x3, x4) = U4_ggga(x4) U5_ggga(x1, x2, x3, x4) = U5_ggga(x4) move_out_ggga(x1, x2, x3, x4) = move_out_ggga U6_ggga(x1, x2, x3, x4, x5) = U6_ggga(x1, x2, x3, x5) U7_ggga(x1, x2, x3, x4, x5, x6) = U7_ggga(x1, x2, x3, x5, x6) U8_ggga(x1, x2, x3, x4, x5, x6, x7) = U8_ggga(x1, x2, x3, x7) U9_ggga(x1, x2, x3, x4, x5) = U9_ggga(x2, x3, x5) U10_ggga(x1, x2, x3, x4, x5) = U10_ggga(x2, x3, x5) U11_ggga(x1, x2, x3, x4, x5, x6) = U11_ggga(x2, x3, x5, x6) move_in_ggag(x1, x2, x3, x4) = move_in_ggag(x1, x2, x4) U1_ggag(x1, x2, x3, x4) = U1_ggag(x1, x4) U2_ggag(x1, x2, x3, x4) = U2_ggag(x4) U3_ggag(x1, x2, x3, x4) = U3_ggag(x4) U4_ggag(x1, x2, x3, x4) = U4_ggag(x4) write_in_a(x1) = write_in_a write_out_a(x1) = write_out_a U5_ggag(x1, x2, x3, x4) = U5_ggag(x4) move_out_ggag(x1, x2, x3, x4) = move_out_ggag U6_ggag(x1, x2, x3, x4, x5) = U6_ggag(x1, x2, x4, x5) U7_ggag(x1, x2, x3, x4, x5, x6) = U7_ggag(x1, x2, x4, x5, x6) U8_ggag(x1, x2, x3, x4, x5, x6, x7) = U8_ggag(x1, x2, x4, x7) U9_ggag(x1, x2, x3, x4, x5) = U9_ggag(x2, x4, x5) U10_ggag(x1, x2, x3, x4, x5) = U10_ggag(x2, x4, x5) U11_ggag(x1, x2, x3, x4, x5, x6) = U11_ggag(x2, x4, x5, x6) U12_ggag(x1, x2, x3, x4, x5, x6) = U12_ggag(x2, x4, x5, x6) move_in_ggaa(x1, x2, x3, x4) = move_in_ggaa(x1, x2) U1_ggaa(x1, x2, x3, x4) = U1_ggaa(x1, x4) U2_ggaa(x1, x2, x3, x4) = U2_ggaa(x4) U3_ggaa(x1, x2, x3, x4) = U3_ggaa(x4) U4_ggaa(x1, x2, x3, x4) = U4_ggaa(x4) U5_ggaa(x1, x2, x3, x4) = U5_ggaa(x4) move_out_ggaa(x1, x2, x3, x4) = move_out_ggaa U6_ggaa(x1, x2, x3, x4, x5) = U6_ggaa(x1, x2, x5) U7_ggaa(x1, x2, x3, x4, x5, x6) = U7_ggaa(x1, x2, x5, x6) U8_ggaa(x1, x2, x3, x4, x5, x6, x7) = U8_ggaa(x1, x2, x7) U9_ggaa(x1, x2, x3, x4, x5) = U9_ggaa(x2, x5) U10_ggaa(x1, x2, x3, x4, x5) = U10_ggaa(x2, x5) U11_ggaa(x1, x2, x3, x4, x5, x6) = U11_ggaa(x2, x5, x6) U12_ggaa(x1, x2, x3, x4, x5, x6) = U12_ggaa(x2, x5, x6) U13_ggaa(x1, x2, x3, x4, x5) = U13_ggaa(x5) move_in_gaag(x1, x2, x3, x4) = move_in_gaag(x1, x4) U1_gaag(x1, x2, x3, x4) = U1_gaag(x4) U2_gaag(x1, x2, x3, x4) = U2_gaag(x4) U3_gaag(x1, x2, x3, x4) = U3_gaag(x4) U4_gaag(x1, x2, x3, x4) = U4_gaag(x4) U5_gaag(x1, x2, x3, x4) = U5_gaag(x4) move_out_gaag(x1, x2, x3, x4) = move_out_gaag U6_gaag(x1, x2, x3, x4, x5) = U6_gaag(x1, x4, x5) U7_gaag(x1, x2, x3, x4, x5, x6) = U7_gaag(x1, x4, x5, x6) U8_gaag(x1, x2, x3, x4, x5, x6, x7) = U8_gaag(x1, x4, x7) U9_gaag(x1, x2, x3, x4, x5) = U9_gaag(x4, x5) U10_gaag(x1, x2, x3, x4, x5) = U10_gaag(x4, x5) U11_gaag(x1, x2, x3, x4, x5, x6) = U11_gaag(x4, x5, x6) move_in_gaga(x1, x2, x3, x4) = move_in_gaga(x1, x3) U1_gaga(x1, x2, x3, x4) = U1_gaga(x2, x4) U2_gaga(x1, x2, x3, x4) = U2_gaga(x2, x4) U3_gaga(x1, x2, x3, x4) = U3_gaga(x2, x4) U4_gaga(x1, x2, x3, x4) = U4_gaga(x4) U5_gaga(x1, x2, x3, x4) = U5_gaga(x4) move_out_gaga(x1, x2, x3, x4) = move_out_gaga U6_gaga(x1, x2, x3, x4, x5) = U6_gaga(x1, x3, x5) U7_gaga(x1, x2, x3, x4, x5, x6) = U7_gaga(x1, x3, x5, x6) U8_gaga(x1, x2, x3, x4, x5, x6, x7) = U8_gaga(x1, x3, x7) U9_gaga(x1, x2, x3, x4, x5) = U9_gaga(x3, x5) U10_gaga(x1, x2, x3, x4, x5) = U10_gaga(x3, x5) U11_gaga(x1, x2, x3, x4, x5, x6) = U11_gaga(x3, x5, x6) U12_gaga(x1, x2, x3, x4, x5, x6) = U12_gaga(x3, x5, x6) U13_gaga(x1, x2, x3, x4, x5) = U13_gaga(x5) U12_gaag(x1, x2, x3, x4, x5, x6) = U12_gaag(x4, x5, x6) move_in_gaaa(x1, x2, x3, x4) = move_in_gaaa(x1) U1_gaaa(x1, x2, x3, x4) = U1_gaaa(x4) U2_gaaa(x1, x2, x3, x4) = U2_gaaa(x4) U3_gaaa(x1, x2, x3, x4) = U3_gaaa(x4) U4_gaaa(x1, x2, x3, x4) = U4_gaaa(x4) U5_gaaa(x1, x2, x3, x4) = U5_gaaa(x4) move_out_gaaa(x1, x2, x3, x4) = move_out_gaaa U6_gaaa(x1, x2, x3, x4, x5) = U6_gaaa(x1, x5) U7_gaaa(x1, x2, x3, x4, x5, x6) = U7_gaaa(x1, x5, x6) U8_gaaa(x1, x2, x3, x4, x5, x6, x7) = U8_gaaa(x1, x7) U9_gaaa(x1, x2, x3, x4, x5) = U9_gaaa(x5) U10_gaaa(x1, x2, x3, x4, x5) = U10_gaaa(x5) U11_gaaa(x1, x2, x3, x4, x5, x6) = U11_gaaa(x5, x6) U12_gaaa(x1, x2, x3, x4, x5, x6) = U12_gaaa(x5, x6) U13_gaaa(x1, x2, x3, x4, x5) = U13_gaaa(x5) U13_gaag(x1, x2, x3, x4, x5) = U13_gaag(x5) U13_ggag(x1, x2, x3, x4, x5) = U13_ggag(x5) U12_ggga(x1, x2, x3, x4, x5, x6) = U12_ggga(x2, x3, x5, x6) U13_ggga(x1, x2, x3, x4, x5) = U13_ggga(x5) move_in_gagg(x1, x2, x3, x4) = move_in_gagg(x1, x3, x4) U1_gagg(x1, x2, x3, x4) = U1_gagg(x2, x4) U2_gagg(x1, x2, x3, x4) = U2_gagg(x2, x4) U3_gagg(x1, x2, x3, x4) = U3_gagg(x2, x4) U4_gagg(x1, x2, x3, x4) = U4_gagg(x4) U5_gagg(x1, x2, x3, x4) = U5_gagg(x4) move_out_gagg(x1, x2, x3, x4) = move_out_gagg U6_gagg(x1, x2, x3, x4, x5) = U6_gagg(x1, x3, x4, x5) U7_gagg(x1, x2, x3, x4, x5, x6) = U7_gagg(x1, x3, x4, x5, x6) U8_gagg(x1, x2, x3, x4, x5, x6, x7) = U8_gagg(x1, x3, x4, x7) U9_gagg(x1, x2, x3, x4, x5) = U9_gagg(x3, x4, x5) U10_gagg(x1, x2, x3, x4, x5) = U10_gagg(x3, x4, x5) U11_gagg(x1, x2, x3, x4, x5, x6) = U11_gagg(x3, x4, x5, x6) U12_gagg(x1, x2, x3, x4, x5, x6) = U12_gagg(x3, x4, x5, x6) U13_gagg(x1, x2, x3, x4, x5) = U13_gagg(x5) U13_gggg(x1, x2, x3, x4, x5) = U13_gggg(x5) MOVE_IN_GGGG(x1, x2, x3, x4) = MOVE_IN_GGGG(x1, x2, x3, x4) U1_GGGG(x1, x2, x3, x4) = U1_GGGG(x1, x2, x4) WRITE_IN_G(x1) = WRITE_IN_G(x1) U2_GGGG(x1, x2, x3, x4) = U2_GGGG(x2, x4) U3_GGGG(x1, x2, x3, x4) = U3_GGGG(x2, x4) U4_GGGG(x1, x2, x3, x4) = U4_GGGG(x4) U5_GGGG(x1, x2, x3, x4) = U5_GGGG(x4) NL_IN_ = NL_IN_ U6_GGGG(x1, x2, x3, x4, x5) = U6_GGGG(x1, x2, x3, x4, x5) =_IN_AG(x1, x2) = =_IN_AG(x2) U7_GGGG(x1, x2, x3, x4, x5, x6) = U7_GGGG(x1, x2, x3, x4, x5, x6) U8_GGGG(x1, x2, x3, x4, x5, x6, x7) = U8_GGGG(x1, x2, x3, x4, x7) ISGREATER_IN_GG(x1, x2) = ISGREATER_IN_GG(x1, x2) U47_GG(x1, x2, x3) = U47_GG(x3) U48_GG(x1, x2, x3) = U48_GG(x3) U9_GGGG(x1, x2, x3, x4, x5) = U9_GGGG(x2, x3, x4, x5) ISMINUS_IN_GGA(x1, x2, x3) = ISMINUS_IN_GGA(x1, x2) U18_GGA(x1, x2, x3) = U18_GGA(x3) U19_GGA(x1, x2, x3) = U19_GGA(x3) U20_GGA(x1, x2, x3, x4) = U20_GGA(x4) U21_GGA(x1, x2, x3, x4) = U21_GGA(x4) U22_GGA(x1, x2, x3, x4) = U22_GGA(x4) U23_GGA(x1, x2, x3, x4) = U23_GGA(x4) U10_GGGG(x1, x2, x3, x4, x5) = U10_GGGG(x2, x3, x4, x5) U11_GGGG(x1, x2, x3, x4, x5, x6) = U11_GGGG(x2, x3, x4, x5, x6) U12_GGGG(x1, x2, x3, x4, x5, x6) = U12_GGGG(x2, x3, x4, x5, x6) MOVE_IN_GGGA(x1, x2, x3, x4) = MOVE_IN_GGGA(x1, x2, x3) U1_GGGA(x1, x2, x3, x4) = U1_GGGA(x1, x2, x4) U2_GGGA(x1, x2, x3, x4) = U2_GGGA(x2, x4) U3_GGGA(x1, x2, x3, x4) = U3_GGGA(x2, x4) U4_GGGA(x1, x2, x3, x4) = U4_GGGA(x4) U5_GGGA(x1, x2, x3, x4) = U5_GGGA(x4) U6_GGGA(x1, x2, x3, x4, x5) = U6_GGGA(x1, x2, x3, x5) U7_GGGA(x1, x2, x3, x4, x5, x6) = U7_GGGA(x1, x2, x3, x5, x6) U8_GGGA(x1, x2, x3, x4, x5, x6, x7) = U8_GGGA(x1, x2, x3, x7) U9_GGGA(x1, x2, x3, x4, x5) = U9_GGGA(x2, x3, x5) U10_GGGA(x1, x2, x3, x4, x5) = U10_GGGA(x2, x3, x5) U11_GGGA(x1, x2, x3, x4, x5, x6) = U11_GGGA(x2, x3, x5, x6) MOVE_IN_GGAG(x1, x2, x3, x4) = MOVE_IN_GGAG(x1, x2, x4) U1_GGAG(x1, x2, x3, x4) = U1_GGAG(x1, x4) U2_GGAG(x1, x2, x3, x4) = U2_GGAG(x4) U3_GGAG(x1, x2, x3, x4) = U3_GGAG(x4) U4_GGAG(x1, x2, x3, x4) = U4_GGAG(x4) WRITE_IN_A(x1) = WRITE_IN_A U5_GGAG(x1, x2, x3, x4) = U5_GGAG(x4) U6_GGAG(x1, x2, x3, x4, x5) = U6_GGAG(x1, x2, x4, x5) U7_GGAG(x1, x2, x3, x4, x5, x6) = U7_GGAG(x1, x2, x4, x5, x6) U8_GGAG(x1, x2, x3, x4, x5, x6, x7) = U8_GGAG(x1, x2, x4, x7) U9_GGAG(x1, x2, x3, x4, x5) = U9_GGAG(x2, x4, x5) U10_GGAG(x1, x2, x3, x4, x5) = U10_GGAG(x2, x4, x5) U11_GGAG(x1, x2, x3, x4, x5, x6) = U11_GGAG(x2, x4, x5, x6) U12_GGAG(x1, x2, x3, x4, x5, x6) = U12_GGAG(x2, x4, x5, x6) MOVE_IN_GGAA(x1, x2, x3, x4) = MOVE_IN_GGAA(x1, x2) U1_GGAA(x1, x2, x3, x4) = U1_GGAA(x1, x4) U2_GGAA(x1, x2, x3, x4) = U2_GGAA(x4) U3_GGAA(x1, x2, x3, x4) = U3_GGAA(x4) U4_GGAA(x1, x2, x3, x4) = U4_GGAA(x4) U5_GGAA(x1, x2, x3, x4) = U5_GGAA(x4) U6_GGAA(x1, x2, x3, x4, x5) = U6_GGAA(x1, x2, x5) U7_GGAA(x1, x2, x3, x4, x5, x6) = U7_GGAA(x1, x2, x5, x6) U8_GGAA(x1, x2, x3, x4, x5, x6, x7) = U8_GGAA(x1, x2, x7) U9_GGAA(x1, x2, x3, x4, x5) = U9_GGAA(x2, x5) U10_GGAA(x1, x2, x3, x4, x5) = U10_GGAA(x2, x5) U11_GGAA(x1, x2, x3, x4, x5, x6) = U11_GGAA(x2, x5, x6) U12_GGAA(x1, x2, x3, x4, x5, x6) = U12_GGAA(x2, x5, x6) U13_GGAA(x1, x2, x3, x4, x5) = U13_GGAA(x5) MOVE_IN_GAAG(x1, x2, x3, x4) = MOVE_IN_GAAG(x1, x4) U1_GAAG(x1, x2, x3, x4) = U1_GAAG(x4) U2_GAAG(x1, x2, x3, x4) = U2_GAAG(x4) U3_GAAG(x1, x2, x3, x4) = U3_GAAG(x4) U4_GAAG(x1, x2, x3, x4) = U4_GAAG(x4) U5_GAAG(x1, x2, x3, x4) = U5_GAAG(x4) U6_GAAG(x1, x2, x3, x4, x5) = U6_GAAG(x1, x4, x5) U7_GAAG(x1, x2, x3, x4, x5, x6) = U7_GAAG(x1, x4, x5, x6) U8_GAAG(x1, x2, x3, x4, x5, x6, x7) = U8_GAAG(x1, x4, x7) U9_GAAG(x1, x2, x3, x4, x5) = U9_GAAG(x4, x5) U10_GAAG(x1, x2, x3, x4, x5) = U10_GAAG(x4, x5) U11_GAAG(x1, x2, x3, x4, x5, x6) = U11_GAAG(x4, x5, x6) MOVE_IN_GAGA(x1, x2, x3, x4) = MOVE_IN_GAGA(x1, x3) U1_GAGA(x1, x2, x3, x4) = U1_GAGA(x2, x4) U2_GAGA(x1, x2, x3, x4) = U2_GAGA(x2, x4) U3_GAGA(x1, x2, x3, x4) = U3_GAGA(x2, x4) U4_GAGA(x1, x2, x3, x4) = U4_GAGA(x4) U5_GAGA(x1, x2, x3, x4) = U5_GAGA(x4) U6_GAGA(x1, x2, x3, x4, x5) = U6_GAGA(x1, x3, x5) U7_GAGA(x1, x2, x3, x4, x5, x6) = U7_GAGA(x1, x3, x5, x6) U8_GAGA(x1, x2, x3, x4, x5, x6, x7) = U8_GAGA(x1, x3, x7) U9_GAGA(x1, x2, x3, x4, x5) = U9_GAGA(x3, x5) U10_GAGA(x1, x2, x3, x4, x5) = U10_GAGA(x3, x5) U11_GAGA(x1, x2, x3, x4, x5, x6) = U11_GAGA(x3, x5, x6) U12_GAGA(x1, x2, x3, x4, x5, x6) = U12_GAGA(x3, x5, x6) U13_GAGA(x1, x2, x3, x4, x5) = U13_GAGA(x5) U12_GAAG(x1, x2, x3, x4, x5, x6) = U12_GAAG(x4, x5, x6) MOVE_IN_GAAA(x1, x2, x3, x4) = MOVE_IN_GAAA(x1) U1_GAAA(x1, x2, x3, x4) = U1_GAAA(x4) U2_GAAA(x1, x2, x3, x4) = U2_GAAA(x4) U3_GAAA(x1, x2, x3, x4) = U3_GAAA(x4) U4_GAAA(x1, x2, x3, x4) = U4_GAAA(x4) U5_GAAA(x1, x2, x3, x4) = U5_GAAA(x4) U6_GAAA(x1, x2, x3, x4, x5) = U6_GAAA(x1, x5) U7_GAAA(x1, x2, x3, x4, x5, x6) = U7_GAAA(x1, x5, x6) U8_GAAA(x1, x2, x3, x4, x5, x6, x7) = U8_GAAA(x1, x7) U9_GAAA(x1, x2, x3, x4, x5) = U9_GAAA(x5) U10_GAAA(x1, x2, x3, x4, x5) = U10_GAAA(x5) U11_GAAA(x1, x2, x3, x4, x5, x6) = U11_GAAA(x5, x6) U12_GAAA(x1, x2, x3, x4, x5, x6) = U12_GAAA(x5, x6) U13_GAAA(x1, x2, x3, x4, x5) = U13_GAAA(x5) U13_GAAG(x1, x2, x3, x4, x5) = U13_GAAG(x5) U13_GGAG(x1, x2, x3, x4, x5) = U13_GGAG(x5) U12_GGGA(x1, x2, x3, x4, x5, x6) = U12_GGGA(x2, x3, x5, x6) U13_GGGA(x1, x2, x3, x4, x5) = U13_GGGA(x5) MOVE_IN_GAGG(x1, x2, x3, x4) = MOVE_IN_GAGG(x1, x3, x4) U1_GAGG(x1, x2, x3, x4) = U1_GAGG(x2, x4) U2_GAGG(x1, x2, x3, x4) = U2_GAGG(x2, x4) U3_GAGG(x1, x2, x3, x4) = U3_GAGG(x2, x4) U4_GAGG(x1, x2, x3, x4) = U4_GAGG(x4) U5_GAGG(x1, x2, x3, x4) = U5_GAGG(x4) U6_GAGG(x1, x2, x3, x4, x5) = U6_GAGG(x1, x3, x4, x5) U7_GAGG(x1, x2, x3, x4, x5, x6) = U7_GAGG(x1, x3, x4, x5, x6) U8_GAGG(x1, x2, x3, x4, x5, x6, x7) = U8_GAGG(x1, x3, x4, x7) U9_GAGG(x1, x2, x3, x4, x5) = U9_GAGG(x3, x4, x5) U10_GAGG(x1, x2, x3, x4, x5) = U10_GAGG(x3, x4, x5) U11_GAGG(x1, x2, x3, x4, x5, x6) = U11_GAGG(x3, x4, x5, x6) U12_GAGG(x1, x2, x3, x4, x5, x6) = U12_GAGG(x3, x4, x5, x6) U13_GAGG(x1, x2, x3, x4, x5) = U13_GAGG(x5) U13_GGGG(x1, x2, x3, x4, x5) = U13_GGGG(x5) We have to consider all (P,R,Pi)-chains ---------------------------------------- (11) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 7 SCCs with 140 less nodes. ---------------------------------------- (12) Complex Obligation (AND) ---------------------------------------- (13) Obligation: Pi DP problem: The TRS P consists of the following rules: ISMINUS_IN_GGA(zero, pred(Y), succ(Z)) -> ISMINUS_IN_GGA(zero, Y, Z) ISMINUS_IN_GGA(zero, succ(Y), pred(Z)) -> ISMINUS_IN_GGA(zero, Y, Z) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, X1, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g(X0) U1_gggg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gggg(X, Y, X1, write_in_g(X)) U2_gggg(X, Y, X1, write_out_g(X)) -> U3_gggg(X, Y, X1, write_in_g(' to ')) U3_gggg(X, Y, X1, write_out_g(' to ')) -> U4_gggg(X, Y, X1, write_in_g(Y)) U4_gggg(X, Y, X1, write_out_g(Y)) -> U5_gggg(X, Y, X1, nl_in_) nl_in_ -> nl_out_ U5_gggg(X, Y, X1, nl_out_) -> move_out_gggg(succ(zero), X, Y, X1) move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(X1, N)) =_in_ag(X, X) -> =_out_ag(X, X) U6_gggg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gggg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg(succ(X), zero) isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg(succ(X), pred(Y)) isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(X, Y, isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg(zero, pred(Y)) isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(X, Y, isGreater_in_gg(X, Y)) U48_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U47_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U8_gggg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gggg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) isMinus_in_gga(X, zero, X) -> isMinus_out_gga(X, zero, X) isMinus_in_gga(zero, succ(Y), pred(Z)) -> U18_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(zero, pred(Y), succ(Z)) -> U19_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), succ(Y), Z) -> U20_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(succ(X), pred(Y), succ(succ(Z))) -> U21_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), succ(Y), pred(pred(Z))) -> U22_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), pred(Y), Z) -> U23_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) U23_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), pred(Y), Z) U22_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), succ(Y), pred(pred(Z))) U21_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), pred(Y), succ(succ(Z))) U20_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), succ(Y), Z) U19_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, pred(Y), succ(Z)) U18_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, succ(Y), pred(Z)) U9_gggg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gggg(N, X, Y, Z, =_in_ag(M, U)) U10_gggg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gggg(N, X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> U12_gggg(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) move_in_ggga(succ(zero), X, Y, X1) -> U1_ggga(X, Y, X1, write_in_g('Move top disk from ')) U1_ggga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggga(X, Y, X1, write_in_g(X)) U2_ggga(X, Y, X1, write_out_g(X)) -> U3_ggga(X, Y, X1, write_in_g(' to ')) U3_ggga(X, Y, X1, write_out_g(' to ')) -> U4_ggga(X, Y, X1, write_in_g(Y)) U4_ggga(X, Y, X1, write_out_g(Y)) -> U5_ggga(X, Y, X1, nl_in_) U5_ggga(X, Y, X1, nl_out_) -> move_out_ggga(succ(zero), X, Y, X1) move_in_ggga(N, X, Y, Z) -> U6_ggga(N, X, Y, Z, =_in_ag(X1, N)) U6_ggga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggga(N, X, Y, Z, =_in_ag(M, U)) U10_ggga(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggga(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) move_in_ggag(succ(zero), X, Y, X1) -> U1_ggag(X, Y, X1, write_in_g('Move top disk from ')) U1_ggag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggag(X, Y, X1, write_in_g(X)) U2_ggag(X, Y, X1, write_out_g(X)) -> U3_ggag(X, Y, X1, write_in_g(' to ')) U3_ggag(X, Y, X1, write_out_g(' to ')) -> U4_ggag(X, Y, X1, write_in_a(Y)) write_in_a(X0) -> write_out_a(X0) U4_ggag(X, Y, X1, write_out_a(Y)) -> U5_ggag(X, Y, X1, nl_in_) U5_ggag(X, Y, X1, nl_out_) -> move_out_ggag(succ(zero), X, Y, X1) move_in_ggag(N, X, Y, Z) -> U6_ggag(N, X, Y, Z, =_in_ag(X1, N)) U6_ggag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggag(N, X, Y, Z, =_in_ag(M, U)) U10_ggag(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggag(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U11_ggag(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_ggag(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) move_in_ggaa(succ(zero), X, Y, X1) -> U1_ggaa(X, Y, X1, write_in_g('Move top disk from ')) U1_ggaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggaa(X, Y, X1, write_in_g(X)) U2_ggaa(X, Y, X1, write_out_g(X)) -> U3_ggaa(X, Y, X1, write_in_g(' to ')) U3_ggaa(X, Y, X1, write_out_g(' to ')) -> U4_ggaa(X, Y, X1, write_in_a(Y)) U4_ggaa(X, Y, X1, write_out_a(Y)) -> U5_ggaa(X, Y, X1, nl_in_) U5_ggaa(X, Y, X1, nl_out_) -> move_out_ggaa(succ(zero), X, Y, X1) move_in_ggaa(N, X, Y, Z) -> U6_ggaa(N, X, Y, Z, =_in_ag(X1, N)) U6_ggaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggaa(N, X, Y, Z, =_in_ag(M, U)) U10_ggaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggaa(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U11_ggaa(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_ggaa(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_ggaa(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggaa(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) move_in_gaag(succ(zero), X, Y, X1) -> U1_gaag(X, Y, X1, write_in_g('Move top disk from ')) U1_gaag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaag(X, Y, X1, write_in_a(X)) U2_gaag(X, Y, X1, write_out_a(X)) -> U3_gaag(X, Y, X1, write_in_g(' to ')) U3_gaag(X, Y, X1, write_out_g(' to ')) -> U4_gaag(X, Y, X1, write_in_a(Y)) U4_gaag(X, Y, X1, write_out_a(Y)) -> U5_gaag(X, Y, X1, nl_in_) U5_gaag(X, Y, X1, nl_out_) -> move_out_gaag(succ(zero), X, Y, X1) move_in_gaag(N, X, Y, Z) -> U6_gaag(N, X, Y, Z, =_in_ag(X1, N)) U6_gaag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaag(N, X, Y, Z, =_in_ag(M, U)) U10_gaag(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaag(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) move_in_gaga(succ(zero), X, Y, X1) -> U1_gaga(X, Y, X1, write_in_g('Move top disk from ')) U1_gaga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaga(X, Y, X1, write_in_a(X)) U2_gaga(X, Y, X1, write_out_a(X)) -> U3_gaga(X, Y, X1, write_in_g(' to ')) U3_gaga(X, Y, X1, write_out_g(' to ')) -> U4_gaga(X, Y, X1, write_in_g(Y)) U4_gaga(X, Y, X1, write_out_g(Y)) -> U5_gaga(X, Y, X1, nl_in_) U5_gaga(X, Y, X1, nl_out_) -> move_out_gaga(succ(zero), X, Y, X1) move_in_gaga(N, X, Y, Z) -> U6_gaga(N, X, Y, Z, =_in_ag(X1, N)) U6_gaga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaga(N, X, Y, Z, =_in_ag(M, U)) U10_gaga(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaga(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U11_gaga(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_gaga(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gaga(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gaga(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U13_gaga(N, X, Y, Z, move_out_gaga(M, Z, Y, X)) -> move_out_gaga(N, X, Y, Z) U11_gaag(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_gaag(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) move_in_gaaa(succ(zero), X, Y, X1) -> U1_gaaa(X, Y, X1, write_in_g('Move top disk from ')) U1_gaaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaaa(X, Y, X1, write_in_a(X)) U2_gaaa(X, Y, X1, write_out_a(X)) -> U3_gaaa(X, Y, X1, write_in_g(' to ')) U3_gaaa(X, Y, X1, write_out_g(' to ')) -> U4_gaaa(X, Y, X1, write_in_a(Y)) U4_gaaa(X, Y, X1, write_out_a(Y)) -> U5_gaaa(X, Y, X1, nl_in_) U5_gaaa(X, Y, X1, nl_out_) -> move_out_gaaa(succ(zero), X, Y, X1) move_in_gaaa(N, X, Y, Z) -> U6_gaaa(N, X, Y, Z, =_in_ag(X1, N)) U6_gaaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaaa(N, X, Y, Z, =_in_ag(M, U)) U10_gaaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaaa(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U11_gaaa(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_gaaa(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_gaaa(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaaa(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U13_gaaa(N, X, Y, Z, move_out_gaaa(M, Z, Y, X)) -> move_out_gaaa(N, X, Y, Z) U12_gaag(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaag(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) U13_gaag(N, X, Y, Z, move_out_ggaa(M, Z, Y, X)) -> move_out_gaag(N, X, Y, Z) U13_ggaa(N, X, Y, Z, move_out_gaag(M, Z, Y, X)) -> move_out_ggaa(N, X, Y, Z) U12_ggag(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggag(N, X, Y, Z, move_in_ggag(M, Z, Y, X)) U13_ggag(N, X, Y, Z, move_out_ggag(M, Z, Y, X)) -> move_out_ggag(N, X, Y, Z) U11_ggga(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_ggga(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U12_ggga(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_ggga(N, X, Y, Z, move_in_gagg(M, Z, Y, X)) move_in_gagg(succ(zero), X, Y, X1) -> U1_gagg(X, Y, X1, write_in_g('Move top disk from ')) U1_gagg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gagg(X, Y, X1, write_in_a(X)) U2_gagg(X, Y, X1, write_out_a(X)) -> U3_gagg(X, Y, X1, write_in_g(' to ')) U3_gagg(X, Y, X1, write_out_g(' to ')) -> U4_gagg(X, Y, X1, write_in_g(Y)) U4_gagg(X, Y, X1, write_out_g(Y)) -> U5_gagg(X, Y, X1, nl_in_) U5_gagg(X, Y, X1, nl_out_) -> move_out_gagg(succ(zero), X, Y, X1) move_in_gagg(N, X, Y, Z) -> U6_gagg(N, X, Y, Z, =_in_ag(X1, N)) U6_gagg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gagg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gagg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gagg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gagg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gagg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gagg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gagg(N, X, Y, Z, =_in_ag(M, U)) U10_gagg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gagg(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U11_gagg(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_gagg(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gagg(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gagg(N, X, Y, Z, move_in_ggga(M, Z, Y, X)) U13_gagg(N, X, Y, Z, move_out_ggga(M, Z, Y, X)) -> move_out_gagg(N, X, Y, Z) U13_ggga(N, X, Y, Z, move_out_gagg(M, Z, Y, X)) -> move_out_ggga(N, X, Y, Z) U12_gggg(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_gggg(N, X, Y, Z, move_in_gggg(M, Z, Y, X)) U13_gggg(N, X, Y, Z, move_out_gggg(M, Z, Y, X)) -> move_out_gggg(N, X, Y, Z) The argument filtering Pi contains the following mapping: move_in_gggg(x1, x2, x3, x4) = move_in_gggg(x1, x2, x3, x4) succ(x1) = succ(x1) zero = zero U1_gggg(x1, x2, x3, x4) = U1_gggg(x1, x2, x4) write_in_g(x1) = write_in_g(x1) write_out_g(x1) = write_out_g 'Move top disk from ' = 'Move top disk from ' U2_gggg(x1, x2, x3, x4) = U2_gggg(x2, x4) U3_gggg(x1, x2, x3, x4) = U3_gggg(x2, x4) ' to ' = ' to ' U4_gggg(x1, x2, x3, x4) = U4_gggg(x4) U5_gggg(x1, x2, x3, x4) = U5_gggg(x4) nl_in_ = nl_in_ nl_out_ = nl_out_ move_out_gggg(x1, x2, x3, x4) = move_out_gggg U6_gggg(x1, x2, x3, x4, x5) = U6_gggg(x1, x2, x3, x4, x5) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U7_gggg(x1, x2, x3, x4, x5, x6) = U7_gggg(x1, x2, x3, x4, x5, x6) U8_gggg(x1, x2, x3, x4, x5, x6, x7) = U8_gggg(x1, x2, x3, x4, x7) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U47_gg(x1, x2, x3) = U47_gg(x3) U48_gg(x1, x2, x3) = U48_gg(x3) U9_gggg(x1, x2, x3, x4, x5) = U9_gggg(x2, x3, x4, x5) isMinus_in_gga(x1, x2, x3) = isMinus_in_gga(x1, x2) isMinus_out_gga(x1, x2, x3) = isMinus_out_gga(x3) U18_gga(x1, x2, x3) = U18_gga(x3) U19_gga(x1, x2, x3) = U19_gga(x3) U20_gga(x1, x2, x3, x4) = U20_gga(x4) U21_gga(x1, x2, x3, x4) = U21_gga(x4) U22_gga(x1, x2, x3, x4) = U22_gga(x4) U23_gga(x1, x2, x3, x4) = U23_gga(x4) U10_gggg(x1, x2, x3, x4, x5) = U10_gggg(x2, x3, x4, x5) U11_gggg(x1, x2, x3, x4, x5, x6) = U11_gggg(x2, x3, x4, x5, x6) U12_gggg(x1, x2, x3, x4, x5, x6) = U12_gggg(x2, x3, x4, x5, x6) move_in_ggga(x1, x2, x3, x4) = move_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4) = U1_ggga(x1, x2, x4) U2_ggga(x1, x2, x3, x4) = U2_ggga(x2, x4) U3_ggga(x1, x2, x3, x4) = U3_ggga(x2, x4) U4_ggga(x1, x2, x3, x4) = U4_ggga(x4) U5_ggga(x1, x2, x3, x4) = U5_ggga(x4) move_out_ggga(x1, x2, x3, x4) = move_out_ggga U6_ggga(x1, x2, x3, x4, x5) = U6_ggga(x1, x2, x3, x5) U7_ggga(x1, x2, x3, x4, x5, x6) = U7_ggga(x1, x2, x3, x5, x6) U8_ggga(x1, x2, x3, x4, x5, x6, x7) = U8_ggga(x1, x2, x3, x7) U9_ggga(x1, x2, x3, x4, x5) = U9_ggga(x2, x3, x5) U10_ggga(x1, x2, x3, x4, x5) = U10_ggga(x2, x3, x5) U11_ggga(x1, x2, x3, x4, x5, x6) = U11_ggga(x2, x3, x5, x6) move_in_ggag(x1, x2, x3, x4) = move_in_ggag(x1, x2, x4) U1_ggag(x1, x2, x3, x4) = U1_ggag(x1, x4) U2_ggag(x1, x2, x3, x4) = U2_ggag(x4) U3_ggag(x1, x2, x3, x4) = U3_ggag(x4) U4_ggag(x1, x2, x3, x4) = U4_ggag(x4) write_in_a(x1) = write_in_a write_out_a(x1) = write_out_a U5_ggag(x1, x2, x3, x4) = U5_ggag(x4) move_out_ggag(x1, x2, x3, x4) = move_out_ggag U6_ggag(x1, x2, x3, x4, x5) = U6_ggag(x1, x2, x4, x5) U7_ggag(x1, x2, x3, x4, x5, x6) = U7_ggag(x1, x2, x4, x5, x6) U8_ggag(x1, x2, x3, x4, x5, x6, x7) = U8_ggag(x1, x2, x4, x7) U9_ggag(x1, x2, x3, x4, x5) = U9_ggag(x2, x4, x5) U10_ggag(x1, x2, x3, x4, x5) = U10_ggag(x2, x4, x5) U11_ggag(x1, x2, x3, x4, x5, x6) = U11_ggag(x2, x4, x5, x6) U12_ggag(x1, x2, x3, x4, x5, x6) = U12_ggag(x2, x4, x5, x6) move_in_ggaa(x1, x2, x3, x4) = move_in_ggaa(x1, x2) U1_ggaa(x1, x2, x3, x4) = U1_ggaa(x1, x4) U2_ggaa(x1, x2, x3, x4) = U2_ggaa(x4) U3_ggaa(x1, x2, x3, x4) = U3_ggaa(x4) U4_ggaa(x1, x2, x3, x4) = U4_ggaa(x4) U5_ggaa(x1, x2, x3, x4) = U5_ggaa(x4) move_out_ggaa(x1, x2, x3, x4) = move_out_ggaa U6_ggaa(x1, x2, x3, x4, x5) = U6_ggaa(x1, x2, x5) U7_ggaa(x1, x2, x3, x4, x5, x6) = U7_ggaa(x1, x2, x5, x6) U8_ggaa(x1, x2, x3, x4, x5, x6, x7) = U8_ggaa(x1, x2, x7) U9_ggaa(x1, x2, x3, x4, x5) = U9_ggaa(x2, x5) U10_ggaa(x1, x2, x3, x4, x5) = U10_ggaa(x2, x5) U11_ggaa(x1, x2, x3, x4, x5, x6) = U11_ggaa(x2, x5, x6) U12_ggaa(x1, x2, x3, x4, x5, x6) = U12_ggaa(x2, x5, x6) U13_ggaa(x1, x2, x3, x4, x5) = U13_ggaa(x5) move_in_gaag(x1, x2, x3, x4) = move_in_gaag(x1, x4) U1_gaag(x1, x2, x3, x4) = U1_gaag(x4) U2_gaag(x1, x2, x3, x4) = U2_gaag(x4) U3_gaag(x1, x2, x3, x4) = U3_gaag(x4) U4_gaag(x1, x2, x3, x4) = U4_gaag(x4) U5_gaag(x1, x2, x3, x4) = U5_gaag(x4) move_out_gaag(x1, x2, x3, x4) = move_out_gaag U6_gaag(x1, x2, x3, x4, x5) = U6_gaag(x1, x4, x5) U7_gaag(x1, x2, x3, x4, x5, x6) = U7_gaag(x1, x4, x5, x6) U8_gaag(x1, x2, x3, x4, x5, x6, x7) = U8_gaag(x1, x4, x7) U9_gaag(x1, x2, x3, x4, x5) = U9_gaag(x4, x5) U10_gaag(x1, x2, x3, x4, x5) = U10_gaag(x4, x5) U11_gaag(x1, x2, x3, x4, x5, x6) = U11_gaag(x4, x5, x6) move_in_gaga(x1, x2, x3, x4) = move_in_gaga(x1, x3) U1_gaga(x1, x2, x3, x4) = U1_gaga(x2, x4) U2_gaga(x1, x2, x3, x4) = U2_gaga(x2, x4) U3_gaga(x1, x2, x3, x4) = U3_gaga(x2, x4) U4_gaga(x1, x2, x3, x4) = U4_gaga(x4) U5_gaga(x1, x2, x3, x4) = U5_gaga(x4) move_out_gaga(x1, x2, x3, x4) = move_out_gaga U6_gaga(x1, x2, x3, x4, x5) = U6_gaga(x1, x3, x5) U7_gaga(x1, x2, x3, x4, x5, x6) = U7_gaga(x1, x3, x5, x6) U8_gaga(x1, x2, x3, x4, x5, x6, x7) = U8_gaga(x1, x3, x7) U9_gaga(x1, x2, x3, x4, x5) = U9_gaga(x3, x5) U10_gaga(x1, x2, x3, x4, x5) = U10_gaga(x3, x5) U11_gaga(x1, x2, x3, x4, x5, x6) = U11_gaga(x3, x5, x6) U12_gaga(x1, x2, x3, x4, x5, x6) = U12_gaga(x3, x5, x6) U13_gaga(x1, x2, x3, x4, x5) = U13_gaga(x5) U12_gaag(x1, x2, x3, x4, x5, x6) = U12_gaag(x4, x5, x6) move_in_gaaa(x1, x2, x3, x4) = move_in_gaaa(x1) U1_gaaa(x1, x2, x3, x4) = U1_gaaa(x4) U2_gaaa(x1, x2, x3, x4) = U2_gaaa(x4) U3_gaaa(x1, x2, x3, x4) = U3_gaaa(x4) U4_gaaa(x1, x2, x3, x4) = U4_gaaa(x4) U5_gaaa(x1, x2, x3, x4) = U5_gaaa(x4) move_out_gaaa(x1, x2, x3, x4) = move_out_gaaa U6_gaaa(x1, x2, x3, x4, x5) = U6_gaaa(x1, x5) U7_gaaa(x1, x2, x3, x4, x5, x6) = U7_gaaa(x1, x5, x6) U8_gaaa(x1, x2, x3, x4, x5, x6, x7) = U8_gaaa(x1, x7) U9_gaaa(x1, x2, x3, x4, x5) = U9_gaaa(x5) U10_gaaa(x1, x2, x3, x4, x5) = U10_gaaa(x5) U11_gaaa(x1, x2, x3, x4, x5, x6) = U11_gaaa(x5, x6) U12_gaaa(x1, x2, x3, x4, x5, x6) = U12_gaaa(x5, x6) U13_gaaa(x1, x2, x3, x4, x5) = U13_gaaa(x5) U13_gaag(x1, x2, x3, x4, x5) = U13_gaag(x5) U13_ggag(x1, x2, x3, x4, x5) = U13_ggag(x5) U12_ggga(x1, x2, x3, x4, x5, x6) = U12_ggga(x2, x3, x5, x6) U13_ggga(x1, x2, x3, x4, x5) = U13_ggga(x5) move_in_gagg(x1, x2, x3, x4) = move_in_gagg(x1, x3, x4) U1_gagg(x1, x2, x3, x4) = U1_gagg(x2, x4) U2_gagg(x1, x2, x3, x4) = U2_gagg(x2, x4) U3_gagg(x1, x2, x3, x4) = U3_gagg(x2, x4) U4_gagg(x1, x2, x3, x4) = U4_gagg(x4) U5_gagg(x1, x2, x3, x4) = U5_gagg(x4) move_out_gagg(x1, x2, x3, x4) = move_out_gagg U6_gagg(x1, x2, x3, x4, x5) = U6_gagg(x1, x3, x4, x5) U7_gagg(x1, x2, x3, x4, x5, x6) = U7_gagg(x1, x3, x4, x5, x6) U8_gagg(x1, x2, x3, x4, x5, x6, x7) = U8_gagg(x1, x3, x4, x7) U9_gagg(x1, x2, x3, x4, x5) = U9_gagg(x3, x4, x5) U10_gagg(x1, x2, x3, x4, x5) = U10_gagg(x3, x4, x5) U11_gagg(x1, x2, x3, x4, x5, x6) = U11_gagg(x3, x4, x5, x6) U12_gagg(x1, x2, x3, x4, x5, x6) = U12_gagg(x3, x4, x5, x6) U13_gagg(x1, x2, x3, x4, x5) = U13_gagg(x5) U13_gggg(x1, x2, x3, x4, x5) = U13_gggg(x5) ISMINUS_IN_GGA(x1, x2, x3) = ISMINUS_IN_GGA(x1, x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (14) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (15) Obligation: Pi DP problem: The TRS P consists of the following rules: ISMINUS_IN_GGA(zero, pred(Y), succ(Z)) -> ISMINUS_IN_GGA(zero, Y, Z) ISMINUS_IN_GGA(zero, succ(Y), pred(Z)) -> ISMINUS_IN_GGA(zero, Y, Z) R is empty. The argument filtering Pi contains the following mapping: succ(x1) = succ(x1) zero = zero pred(x1) = pred(x1) ISMINUS_IN_GGA(x1, x2, x3) = ISMINUS_IN_GGA(x1, x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (16) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (17) Obligation: Q DP problem: The TRS P consists of the following rules: ISMINUS_IN_GGA(zero, pred(Y)) -> ISMINUS_IN_GGA(zero, Y) ISMINUS_IN_GGA(zero, succ(Y)) -> ISMINUS_IN_GGA(zero, Y) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (18) 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: *ISMINUS_IN_GGA(zero, pred(Y)) -> ISMINUS_IN_GGA(zero, Y) The graph contains the following edges 1 >= 1, 2 > 2 *ISMINUS_IN_GGA(zero, succ(Y)) -> ISMINUS_IN_GGA(zero, Y) The graph contains the following edges 1 >= 1, 2 > 2 ---------------------------------------- (19) YES ---------------------------------------- (20) Obligation: Pi DP problem: The TRS P consists of the following rules: ISMINUS_IN_GGA(succ(X), pred(Y), succ(succ(Z))) -> ISMINUS_IN_GGA(X, Y, Z) ISMINUS_IN_GGA(succ(X), succ(Y), Z) -> ISMINUS_IN_GGA(X, Y, Z) ISMINUS_IN_GGA(pred(X), succ(Y), pred(pred(Z))) -> ISMINUS_IN_GGA(X, Y, Z) ISMINUS_IN_GGA(pred(X), pred(Y), Z) -> ISMINUS_IN_GGA(X, Y, Z) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, X1, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g(X0) U1_gggg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gggg(X, Y, X1, write_in_g(X)) U2_gggg(X, Y, X1, write_out_g(X)) -> U3_gggg(X, Y, X1, write_in_g(' to ')) U3_gggg(X, Y, X1, write_out_g(' to ')) -> U4_gggg(X, Y, X1, write_in_g(Y)) U4_gggg(X, Y, X1, write_out_g(Y)) -> U5_gggg(X, Y, X1, nl_in_) nl_in_ -> nl_out_ U5_gggg(X, Y, X1, nl_out_) -> move_out_gggg(succ(zero), X, Y, X1) move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(X1, N)) =_in_ag(X, X) -> =_out_ag(X, X) U6_gggg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gggg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg(succ(X), zero) isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg(succ(X), pred(Y)) isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(X, Y, isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg(zero, pred(Y)) isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(X, Y, isGreater_in_gg(X, Y)) U48_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U47_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U8_gggg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gggg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) isMinus_in_gga(X, zero, X) -> isMinus_out_gga(X, zero, X) isMinus_in_gga(zero, succ(Y), pred(Z)) -> U18_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(zero, pred(Y), succ(Z)) -> U19_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), succ(Y), Z) -> U20_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(succ(X), pred(Y), succ(succ(Z))) -> U21_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), succ(Y), pred(pred(Z))) -> U22_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), pred(Y), Z) -> U23_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) U23_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), pred(Y), Z) U22_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), succ(Y), pred(pred(Z))) U21_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), pred(Y), succ(succ(Z))) U20_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), succ(Y), Z) U19_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, pred(Y), succ(Z)) U18_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, succ(Y), pred(Z)) U9_gggg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gggg(N, X, Y, Z, =_in_ag(M, U)) U10_gggg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gggg(N, X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> U12_gggg(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) move_in_ggga(succ(zero), X, Y, X1) -> U1_ggga(X, Y, X1, write_in_g('Move top disk from ')) U1_ggga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggga(X, Y, X1, write_in_g(X)) U2_ggga(X, Y, X1, write_out_g(X)) -> U3_ggga(X, Y, X1, write_in_g(' to ')) U3_ggga(X, Y, X1, write_out_g(' to ')) -> U4_ggga(X, Y, X1, write_in_g(Y)) U4_ggga(X, Y, X1, write_out_g(Y)) -> U5_ggga(X, Y, X1, nl_in_) U5_ggga(X, Y, X1, nl_out_) -> move_out_ggga(succ(zero), X, Y, X1) move_in_ggga(N, X, Y, Z) -> U6_ggga(N, X, Y, Z, =_in_ag(X1, N)) U6_ggga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggga(N, X, Y, Z, =_in_ag(M, U)) U10_ggga(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggga(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) move_in_ggag(succ(zero), X, Y, X1) -> U1_ggag(X, Y, X1, write_in_g('Move top disk from ')) U1_ggag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggag(X, Y, X1, write_in_g(X)) U2_ggag(X, Y, X1, write_out_g(X)) -> U3_ggag(X, Y, X1, write_in_g(' to ')) U3_ggag(X, Y, X1, write_out_g(' to ')) -> U4_ggag(X, Y, X1, write_in_a(Y)) write_in_a(X0) -> write_out_a(X0) U4_ggag(X, Y, X1, write_out_a(Y)) -> U5_ggag(X, Y, X1, nl_in_) U5_ggag(X, Y, X1, nl_out_) -> move_out_ggag(succ(zero), X, Y, X1) move_in_ggag(N, X, Y, Z) -> U6_ggag(N, X, Y, Z, =_in_ag(X1, N)) U6_ggag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggag(N, X, Y, Z, =_in_ag(M, U)) U10_ggag(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggag(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U11_ggag(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_ggag(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) move_in_ggaa(succ(zero), X, Y, X1) -> U1_ggaa(X, Y, X1, write_in_g('Move top disk from ')) U1_ggaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggaa(X, Y, X1, write_in_g(X)) U2_ggaa(X, Y, X1, write_out_g(X)) -> U3_ggaa(X, Y, X1, write_in_g(' to ')) U3_ggaa(X, Y, X1, write_out_g(' to ')) -> U4_ggaa(X, Y, X1, write_in_a(Y)) U4_ggaa(X, Y, X1, write_out_a(Y)) -> U5_ggaa(X, Y, X1, nl_in_) U5_ggaa(X, Y, X1, nl_out_) -> move_out_ggaa(succ(zero), X, Y, X1) move_in_ggaa(N, X, Y, Z) -> U6_ggaa(N, X, Y, Z, =_in_ag(X1, N)) U6_ggaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggaa(N, X, Y, Z, =_in_ag(M, U)) U10_ggaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggaa(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U11_ggaa(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_ggaa(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_ggaa(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggaa(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) move_in_gaag(succ(zero), X, Y, X1) -> U1_gaag(X, Y, X1, write_in_g('Move top disk from ')) U1_gaag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaag(X, Y, X1, write_in_a(X)) U2_gaag(X, Y, X1, write_out_a(X)) -> U3_gaag(X, Y, X1, write_in_g(' to ')) U3_gaag(X, Y, X1, write_out_g(' to ')) -> U4_gaag(X, Y, X1, write_in_a(Y)) U4_gaag(X, Y, X1, write_out_a(Y)) -> U5_gaag(X, Y, X1, nl_in_) U5_gaag(X, Y, X1, nl_out_) -> move_out_gaag(succ(zero), X, Y, X1) move_in_gaag(N, X, Y, Z) -> U6_gaag(N, X, Y, Z, =_in_ag(X1, N)) U6_gaag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaag(N, X, Y, Z, =_in_ag(M, U)) U10_gaag(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaag(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) move_in_gaga(succ(zero), X, Y, X1) -> U1_gaga(X, Y, X1, write_in_g('Move top disk from ')) U1_gaga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaga(X, Y, X1, write_in_a(X)) U2_gaga(X, Y, X1, write_out_a(X)) -> U3_gaga(X, Y, X1, write_in_g(' to ')) U3_gaga(X, Y, X1, write_out_g(' to ')) -> U4_gaga(X, Y, X1, write_in_g(Y)) U4_gaga(X, Y, X1, write_out_g(Y)) -> U5_gaga(X, Y, X1, nl_in_) U5_gaga(X, Y, X1, nl_out_) -> move_out_gaga(succ(zero), X, Y, X1) move_in_gaga(N, X, Y, Z) -> U6_gaga(N, X, Y, Z, =_in_ag(X1, N)) U6_gaga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaga(N, X, Y, Z, =_in_ag(M, U)) U10_gaga(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaga(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U11_gaga(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_gaga(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gaga(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gaga(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U13_gaga(N, X, Y, Z, move_out_gaga(M, Z, Y, X)) -> move_out_gaga(N, X, Y, Z) U11_gaag(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_gaag(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) move_in_gaaa(succ(zero), X, Y, X1) -> U1_gaaa(X, Y, X1, write_in_g('Move top disk from ')) U1_gaaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaaa(X, Y, X1, write_in_a(X)) U2_gaaa(X, Y, X1, write_out_a(X)) -> U3_gaaa(X, Y, X1, write_in_g(' to ')) U3_gaaa(X, Y, X1, write_out_g(' to ')) -> U4_gaaa(X, Y, X1, write_in_a(Y)) U4_gaaa(X, Y, X1, write_out_a(Y)) -> U5_gaaa(X, Y, X1, nl_in_) U5_gaaa(X, Y, X1, nl_out_) -> move_out_gaaa(succ(zero), X, Y, X1) move_in_gaaa(N, X, Y, Z) -> U6_gaaa(N, X, Y, Z, =_in_ag(X1, N)) U6_gaaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaaa(N, X, Y, Z, =_in_ag(M, U)) U10_gaaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaaa(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U11_gaaa(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_gaaa(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_gaaa(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaaa(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U13_gaaa(N, X, Y, Z, move_out_gaaa(M, Z, Y, X)) -> move_out_gaaa(N, X, Y, Z) U12_gaag(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaag(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) U13_gaag(N, X, Y, Z, move_out_ggaa(M, Z, Y, X)) -> move_out_gaag(N, X, Y, Z) U13_ggaa(N, X, Y, Z, move_out_gaag(M, Z, Y, X)) -> move_out_ggaa(N, X, Y, Z) U12_ggag(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggag(N, X, Y, Z, move_in_ggag(M, Z, Y, X)) U13_ggag(N, X, Y, Z, move_out_ggag(M, Z, Y, X)) -> move_out_ggag(N, X, Y, Z) U11_ggga(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_ggga(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U12_ggga(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_ggga(N, X, Y, Z, move_in_gagg(M, Z, Y, X)) move_in_gagg(succ(zero), X, Y, X1) -> U1_gagg(X, Y, X1, write_in_g('Move top disk from ')) U1_gagg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gagg(X, Y, X1, write_in_a(X)) U2_gagg(X, Y, X1, write_out_a(X)) -> U3_gagg(X, Y, X1, write_in_g(' to ')) U3_gagg(X, Y, X1, write_out_g(' to ')) -> U4_gagg(X, Y, X1, write_in_g(Y)) U4_gagg(X, Y, X1, write_out_g(Y)) -> U5_gagg(X, Y, X1, nl_in_) U5_gagg(X, Y, X1, nl_out_) -> move_out_gagg(succ(zero), X, Y, X1) move_in_gagg(N, X, Y, Z) -> U6_gagg(N, X, Y, Z, =_in_ag(X1, N)) U6_gagg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gagg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gagg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gagg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gagg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gagg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gagg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gagg(N, X, Y, Z, =_in_ag(M, U)) U10_gagg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gagg(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U11_gagg(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_gagg(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gagg(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gagg(N, X, Y, Z, move_in_ggga(M, Z, Y, X)) U13_gagg(N, X, Y, Z, move_out_ggga(M, Z, Y, X)) -> move_out_gagg(N, X, Y, Z) U13_ggga(N, X, Y, Z, move_out_gagg(M, Z, Y, X)) -> move_out_ggga(N, X, Y, Z) U12_gggg(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_gggg(N, X, Y, Z, move_in_gggg(M, Z, Y, X)) U13_gggg(N, X, Y, Z, move_out_gggg(M, Z, Y, X)) -> move_out_gggg(N, X, Y, Z) The argument filtering Pi contains the following mapping: move_in_gggg(x1, x2, x3, x4) = move_in_gggg(x1, x2, x3, x4) succ(x1) = succ(x1) zero = zero U1_gggg(x1, x2, x3, x4) = U1_gggg(x1, x2, x4) write_in_g(x1) = write_in_g(x1) write_out_g(x1) = write_out_g 'Move top disk from ' = 'Move top disk from ' U2_gggg(x1, x2, x3, x4) = U2_gggg(x2, x4) U3_gggg(x1, x2, x3, x4) = U3_gggg(x2, x4) ' to ' = ' to ' U4_gggg(x1, x2, x3, x4) = U4_gggg(x4) U5_gggg(x1, x2, x3, x4) = U5_gggg(x4) nl_in_ = nl_in_ nl_out_ = nl_out_ move_out_gggg(x1, x2, x3, x4) = move_out_gggg U6_gggg(x1, x2, x3, x4, x5) = U6_gggg(x1, x2, x3, x4, x5) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U7_gggg(x1, x2, x3, x4, x5, x6) = U7_gggg(x1, x2, x3, x4, x5, x6) U8_gggg(x1, x2, x3, x4, x5, x6, x7) = U8_gggg(x1, x2, x3, x4, x7) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U47_gg(x1, x2, x3) = U47_gg(x3) U48_gg(x1, x2, x3) = U48_gg(x3) U9_gggg(x1, x2, x3, x4, x5) = U9_gggg(x2, x3, x4, x5) isMinus_in_gga(x1, x2, x3) = isMinus_in_gga(x1, x2) isMinus_out_gga(x1, x2, x3) = isMinus_out_gga(x3) U18_gga(x1, x2, x3) = U18_gga(x3) U19_gga(x1, x2, x3) = U19_gga(x3) U20_gga(x1, x2, x3, x4) = U20_gga(x4) U21_gga(x1, x2, x3, x4) = U21_gga(x4) U22_gga(x1, x2, x3, x4) = U22_gga(x4) U23_gga(x1, x2, x3, x4) = U23_gga(x4) U10_gggg(x1, x2, x3, x4, x5) = U10_gggg(x2, x3, x4, x5) U11_gggg(x1, x2, x3, x4, x5, x6) = U11_gggg(x2, x3, x4, x5, x6) U12_gggg(x1, x2, x3, x4, x5, x6) = U12_gggg(x2, x3, x4, x5, x6) move_in_ggga(x1, x2, x3, x4) = move_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4) = U1_ggga(x1, x2, x4) U2_ggga(x1, x2, x3, x4) = U2_ggga(x2, x4) U3_ggga(x1, x2, x3, x4) = U3_ggga(x2, x4) U4_ggga(x1, x2, x3, x4) = U4_ggga(x4) U5_ggga(x1, x2, x3, x4) = U5_ggga(x4) move_out_ggga(x1, x2, x3, x4) = move_out_ggga U6_ggga(x1, x2, x3, x4, x5) = U6_ggga(x1, x2, x3, x5) U7_ggga(x1, x2, x3, x4, x5, x6) = U7_ggga(x1, x2, x3, x5, x6) U8_ggga(x1, x2, x3, x4, x5, x6, x7) = U8_ggga(x1, x2, x3, x7) U9_ggga(x1, x2, x3, x4, x5) = U9_ggga(x2, x3, x5) U10_ggga(x1, x2, x3, x4, x5) = U10_ggga(x2, x3, x5) U11_ggga(x1, x2, x3, x4, x5, x6) = U11_ggga(x2, x3, x5, x6) move_in_ggag(x1, x2, x3, x4) = move_in_ggag(x1, x2, x4) U1_ggag(x1, x2, x3, x4) = U1_ggag(x1, x4) U2_ggag(x1, x2, x3, x4) = U2_ggag(x4) U3_ggag(x1, x2, x3, x4) = U3_ggag(x4) U4_ggag(x1, x2, x3, x4) = U4_ggag(x4) write_in_a(x1) = write_in_a write_out_a(x1) = write_out_a U5_ggag(x1, x2, x3, x4) = U5_ggag(x4) move_out_ggag(x1, x2, x3, x4) = move_out_ggag U6_ggag(x1, x2, x3, x4, x5) = U6_ggag(x1, x2, x4, x5) U7_ggag(x1, x2, x3, x4, x5, x6) = U7_ggag(x1, x2, x4, x5, x6) U8_ggag(x1, x2, x3, x4, x5, x6, x7) = U8_ggag(x1, x2, x4, x7) U9_ggag(x1, x2, x3, x4, x5) = U9_ggag(x2, x4, x5) U10_ggag(x1, x2, x3, x4, x5) = U10_ggag(x2, x4, x5) U11_ggag(x1, x2, x3, x4, x5, x6) = U11_ggag(x2, x4, x5, x6) U12_ggag(x1, x2, x3, x4, x5, x6) = U12_ggag(x2, x4, x5, x6) move_in_ggaa(x1, x2, x3, x4) = move_in_ggaa(x1, x2) U1_ggaa(x1, x2, x3, x4) = U1_ggaa(x1, x4) U2_ggaa(x1, x2, x3, x4) = U2_ggaa(x4) U3_ggaa(x1, x2, x3, x4) = U3_ggaa(x4) U4_ggaa(x1, x2, x3, x4) = U4_ggaa(x4) U5_ggaa(x1, x2, x3, x4) = U5_ggaa(x4) move_out_ggaa(x1, x2, x3, x4) = move_out_ggaa U6_ggaa(x1, x2, x3, x4, x5) = U6_ggaa(x1, x2, x5) U7_ggaa(x1, x2, x3, x4, x5, x6) = U7_ggaa(x1, x2, x5, x6) U8_ggaa(x1, x2, x3, x4, x5, x6, x7) = U8_ggaa(x1, x2, x7) U9_ggaa(x1, x2, x3, x4, x5) = U9_ggaa(x2, x5) U10_ggaa(x1, x2, x3, x4, x5) = U10_ggaa(x2, x5) U11_ggaa(x1, x2, x3, x4, x5, x6) = U11_ggaa(x2, x5, x6) U12_ggaa(x1, x2, x3, x4, x5, x6) = U12_ggaa(x2, x5, x6) U13_ggaa(x1, x2, x3, x4, x5) = U13_ggaa(x5) move_in_gaag(x1, x2, x3, x4) = move_in_gaag(x1, x4) U1_gaag(x1, x2, x3, x4) = U1_gaag(x4) U2_gaag(x1, x2, x3, x4) = U2_gaag(x4) U3_gaag(x1, x2, x3, x4) = U3_gaag(x4) U4_gaag(x1, x2, x3, x4) = U4_gaag(x4) U5_gaag(x1, x2, x3, x4) = U5_gaag(x4) move_out_gaag(x1, x2, x3, x4) = move_out_gaag U6_gaag(x1, x2, x3, x4, x5) = U6_gaag(x1, x4, x5) U7_gaag(x1, x2, x3, x4, x5, x6) = U7_gaag(x1, x4, x5, x6) U8_gaag(x1, x2, x3, x4, x5, x6, x7) = U8_gaag(x1, x4, x7) U9_gaag(x1, x2, x3, x4, x5) = U9_gaag(x4, x5) U10_gaag(x1, x2, x3, x4, x5) = U10_gaag(x4, x5) U11_gaag(x1, x2, x3, x4, x5, x6) = U11_gaag(x4, x5, x6) move_in_gaga(x1, x2, x3, x4) = move_in_gaga(x1, x3) U1_gaga(x1, x2, x3, x4) = U1_gaga(x2, x4) U2_gaga(x1, x2, x3, x4) = U2_gaga(x2, x4) U3_gaga(x1, x2, x3, x4) = U3_gaga(x2, x4) U4_gaga(x1, x2, x3, x4) = U4_gaga(x4) U5_gaga(x1, x2, x3, x4) = U5_gaga(x4) move_out_gaga(x1, x2, x3, x4) = move_out_gaga U6_gaga(x1, x2, x3, x4, x5) = U6_gaga(x1, x3, x5) U7_gaga(x1, x2, x3, x4, x5, x6) = U7_gaga(x1, x3, x5, x6) U8_gaga(x1, x2, x3, x4, x5, x6, x7) = U8_gaga(x1, x3, x7) U9_gaga(x1, x2, x3, x4, x5) = U9_gaga(x3, x5) U10_gaga(x1, x2, x3, x4, x5) = U10_gaga(x3, x5) U11_gaga(x1, x2, x3, x4, x5, x6) = U11_gaga(x3, x5, x6) U12_gaga(x1, x2, x3, x4, x5, x6) = U12_gaga(x3, x5, x6) U13_gaga(x1, x2, x3, x4, x5) = U13_gaga(x5) U12_gaag(x1, x2, x3, x4, x5, x6) = U12_gaag(x4, x5, x6) move_in_gaaa(x1, x2, x3, x4) = move_in_gaaa(x1) U1_gaaa(x1, x2, x3, x4) = U1_gaaa(x4) U2_gaaa(x1, x2, x3, x4) = U2_gaaa(x4) U3_gaaa(x1, x2, x3, x4) = U3_gaaa(x4) U4_gaaa(x1, x2, x3, x4) = U4_gaaa(x4) U5_gaaa(x1, x2, x3, x4) = U5_gaaa(x4) move_out_gaaa(x1, x2, x3, x4) = move_out_gaaa U6_gaaa(x1, x2, x3, x4, x5) = U6_gaaa(x1, x5) U7_gaaa(x1, x2, x3, x4, x5, x6) = U7_gaaa(x1, x5, x6) U8_gaaa(x1, x2, x3, x4, x5, x6, x7) = U8_gaaa(x1, x7) U9_gaaa(x1, x2, x3, x4, x5) = U9_gaaa(x5) U10_gaaa(x1, x2, x3, x4, x5) = U10_gaaa(x5) U11_gaaa(x1, x2, x3, x4, x5, x6) = U11_gaaa(x5, x6) U12_gaaa(x1, x2, x3, x4, x5, x6) = U12_gaaa(x5, x6) U13_gaaa(x1, x2, x3, x4, x5) = U13_gaaa(x5) U13_gaag(x1, x2, x3, x4, x5) = U13_gaag(x5) U13_ggag(x1, x2, x3, x4, x5) = U13_ggag(x5) U12_ggga(x1, x2, x3, x4, x5, x6) = U12_ggga(x2, x3, x5, x6) U13_ggga(x1, x2, x3, x4, x5) = U13_ggga(x5) move_in_gagg(x1, x2, x3, x4) = move_in_gagg(x1, x3, x4) U1_gagg(x1, x2, x3, x4) = U1_gagg(x2, x4) U2_gagg(x1, x2, x3, x4) = U2_gagg(x2, x4) U3_gagg(x1, x2, x3, x4) = U3_gagg(x2, x4) U4_gagg(x1, x2, x3, x4) = U4_gagg(x4) U5_gagg(x1, x2, x3, x4) = U5_gagg(x4) move_out_gagg(x1, x2, x3, x4) = move_out_gagg U6_gagg(x1, x2, x3, x4, x5) = U6_gagg(x1, x3, x4, x5) U7_gagg(x1, x2, x3, x4, x5, x6) = U7_gagg(x1, x3, x4, x5, x6) U8_gagg(x1, x2, x3, x4, x5, x6, x7) = U8_gagg(x1, x3, x4, x7) U9_gagg(x1, x2, x3, x4, x5) = U9_gagg(x3, x4, x5) U10_gagg(x1, x2, x3, x4, x5) = U10_gagg(x3, x4, x5) U11_gagg(x1, x2, x3, x4, x5, x6) = U11_gagg(x3, x4, x5, x6) U12_gagg(x1, x2, x3, x4, x5, x6) = U12_gagg(x3, x4, x5, x6) U13_gagg(x1, x2, x3, x4, x5) = U13_gagg(x5) U13_gggg(x1, x2, x3, x4, x5) = U13_gggg(x5) ISMINUS_IN_GGA(x1, x2, x3) = ISMINUS_IN_GGA(x1, x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (21) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (22) Obligation: Pi DP problem: The TRS P consists of the following rules: ISMINUS_IN_GGA(succ(X), pred(Y), succ(succ(Z))) -> ISMINUS_IN_GGA(X, Y, Z) ISMINUS_IN_GGA(succ(X), succ(Y), Z) -> ISMINUS_IN_GGA(X, Y, Z) ISMINUS_IN_GGA(pred(X), succ(Y), pred(pred(Z))) -> ISMINUS_IN_GGA(X, Y, Z) ISMINUS_IN_GGA(pred(X), pred(Y), Z) -> ISMINUS_IN_GGA(X, Y, Z) R is empty. The argument filtering Pi contains the following mapping: succ(x1) = succ(x1) pred(x1) = pred(x1) ISMINUS_IN_GGA(x1, x2, x3) = ISMINUS_IN_GGA(x1, x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (23) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (24) Obligation: Q DP problem: The TRS P consists of the following rules: ISMINUS_IN_GGA(succ(X), pred(Y)) -> ISMINUS_IN_GGA(X, Y) ISMINUS_IN_GGA(succ(X), succ(Y)) -> ISMINUS_IN_GGA(X, Y) ISMINUS_IN_GGA(pred(X), succ(Y)) -> ISMINUS_IN_GGA(X, Y) ISMINUS_IN_GGA(pred(X), pred(Y)) -> ISMINUS_IN_GGA(X, Y) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (25) 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: *ISMINUS_IN_GGA(succ(X), pred(Y)) -> ISMINUS_IN_GGA(X, Y) The graph contains the following edges 1 > 1, 2 > 2 *ISMINUS_IN_GGA(succ(X), succ(Y)) -> ISMINUS_IN_GGA(X, Y) The graph contains the following edges 1 > 1, 2 > 2 *ISMINUS_IN_GGA(pred(X), succ(Y)) -> ISMINUS_IN_GGA(X, Y) The graph contains the following edges 1 > 1, 2 > 2 *ISMINUS_IN_GGA(pred(X), pred(Y)) -> ISMINUS_IN_GGA(X, Y) The graph contains the following edges 1 > 1, 2 > 2 ---------------------------------------- (26) YES ---------------------------------------- (27) Obligation: Pi DP problem: The TRS P consists of the following rules: ISGREATER_IN_GG(pred(X), pred(Y)) -> ISGREATER_IN_GG(X, Y) ISGREATER_IN_GG(succ(X), succ(Y)) -> ISGREATER_IN_GG(X, Y) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, X1, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g(X0) U1_gggg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gggg(X, Y, X1, write_in_g(X)) U2_gggg(X, Y, X1, write_out_g(X)) -> U3_gggg(X, Y, X1, write_in_g(' to ')) U3_gggg(X, Y, X1, write_out_g(' to ')) -> U4_gggg(X, Y, X1, write_in_g(Y)) U4_gggg(X, Y, X1, write_out_g(Y)) -> U5_gggg(X, Y, X1, nl_in_) nl_in_ -> nl_out_ U5_gggg(X, Y, X1, nl_out_) -> move_out_gggg(succ(zero), X, Y, X1) move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(X1, N)) =_in_ag(X, X) -> =_out_ag(X, X) U6_gggg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gggg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg(succ(X), zero) isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg(succ(X), pred(Y)) isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(X, Y, isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg(zero, pred(Y)) isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(X, Y, isGreater_in_gg(X, Y)) U48_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U47_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U8_gggg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gggg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) isMinus_in_gga(X, zero, X) -> isMinus_out_gga(X, zero, X) isMinus_in_gga(zero, succ(Y), pred(Z)) -> U18_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(zero, pred(Y), succ(Z)) -> U19_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), succ(Y), Z) -> U20_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(succ(X), pred(Y), succ(succ(Z))) -> U21_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), succ(Y), pred(pred(Z))) -> U22_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), pred(Y), Z) -> U23_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) U23_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), pred(Y), Z) U22_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), succ(Y), pred(pred(Z))) U21_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), pred(Y), succ(succ(Z))) U20_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), succ(Y), Z) U19_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, pred(Y), succ(Z)) U18_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, succ(Y), pred(Z)) U9_gggg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gggg(N, X, Y, Z, =_in_ag(M, U)) U10_gggg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gggg(N, X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> U12_gggg(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) move_in_ggga(succ(zero), X, Y, X1) -> U1_ggga(X, Y, X1, write_in_g('Move top disk from ')) U1_ggga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggga(X, Y, X1, write_in_g(X)) U2_ggga(X, Y, X1, write_out_g(X)) -> U3_ggga(X, Y, X1, write_in_g(' to ')) U3_ggga(X, Y, X1, write_out_g(' to ')) -> U4_ggga(X, Y, X1, write_in_g(Y)) U4_ggga(X, Y, X1, write_out_g(Y)) -> U5_ggga(X, Y, X1, nl_in_) U5_ggga(X, Y, X1, nl_out_) -> move_out_ggga(succ(zero), X, Y, X1) move_in_ggga(N, X, Y, Z) -> U6_ggga(N, X, Y, Z, =_in_ag(X1, N)) U6_ggga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggga(N, X, Y, Z, =_in_ag(M, U)) U10_ggga(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggga(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) move_in_ggag(succ(zero), X, Y, X1) -> U1_ggag(X, Y, X1, write_in_g('Move top disk from ')) U1_ggag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggag(X, Y, X1, write_in_g(X)) U2_ggag(X, Y, X1, write_out_g(X)) -> U3_ggag(X, Y, X1, write_in_g(' to ')) U3_ggag(X, Y, X1, write_out_g(' to ')) -> U4_ggag(X, Y, X1, write_in_a(Y)) write_in_a(X0) -> write_out_a(X0) U4_ggag(X, Y, X1, write_out_a(Y)) -> U5_ggag(X, Y, X1, nl_in_) U5_ggag(X, Y, X1, nl_out_) -> move_out_ggag(succ(zero), X, Y, X1) move_in_ggag(N, X, Y, Z) -> U6_ggag(N, X, Y, Z, =_in_ag(X1, N)) U6_ggag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggag(N, X, Y, Z, =_in_ag(M, U)) U10_ggag(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggag(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U11_ggag(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_ggag(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) move_in_ggaa(succ(zero), X, Y, X1) -> U1_ggaa(X, Y, X1, write_in_g('Move top disk from ')) U1_ggaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggaa(X, Y, X1, write_in_g(X)) U2_ggaa(X, Y, X1, write_out_g(X)) -> U3_ggaa(X, Y, X1, write_in_g(' to ')) U3_ggaa(X, Y, X1, write_out_g(' to ')) -> U4_ggaa(X, Y, X1, write_in_a(Y)) U4_ggaa(X, Y, X1, write_out_a(Y)) -> U5_ggaa(X, Y, X1, nl_in_) U5_ggaa(X, Y, X1, nl_out_) -> move_out_ggaa(succ(zero), X, Y, X1) move_in_ggaa(N, X, Y, Z) -> U6_ggaa(N, X, Y, Z, =_in_ag(X1, N)) U6_ggaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggaa(N, X, Y, Z, =_in_ag(M, U)) U10_ggaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggaa(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U11_ggaa(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_ggaa(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_ggaa(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggaa(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) move_in_gaag(succ(zero), X, Y, X1) -> U1_gaag(X, Y, X1, write_in_g('Move top disk from ')) U1_gaag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaag(X, Y, X1, write_in_a(X)) U2_gaag(X, Y, X1, write_out_a(X)) -> U3_gaag(X, Y, X1, write_in_g(' to ')) U3_gaag(X, Y, X1, write_out_g(' to ')) -> U4_gaag(X, Y, X1, write_in_a(Y)) U4_gaag(X, Y, X1, write_out_a(Y)) -> U5_gaag(X, Y, X1, nl_in_) U5_gaag(X, Y, X1, nl_out_) -> move_out_gaag(succ(zero), X, Y, X1) move_in_gaag(N, X, Y, Z) -> U6_gaag(N, X, Y, Z, =_in_ag(X1, N)) U6_gaag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaag(N, X, Y, Z, =_in_ag(M, U)) U10_gaag(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaag(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) move_in_gaga(succ(zero), X, Y, X1) -> U1_gaga(X, Y, X1, write_in_g('Move top disk from ')) U1_gaga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaga(X, Y, X1, write_in_a(X)) U2_gaga(X, Y, X1, write_out_a(X)) -> U3_gaga(X, Y, X1, write_in_g(' to ')) U3_gaga(X, Y, X1, write_out_g(' to ')) -> U4_gaga(X, Y, X1, write_in_g(Y)) U4_gaga(X, Y, X1, write_out_g(Y)) -> U5_gaga(X, Y, X1, nl_in_) U5_gaga(X, Y, X1, nl_out_) -> move_out_gaga(succ(zero), X, Y, X1) move_in_gaga(N, X, Y, Z) -> U6_gaga(N, X, Y, Z, =_in_ag(X1, N)) U6_gaga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaga(N, X, Y, Z, =_in_ag(M, U)) U10_gaga(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaga(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U11_gaga(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_gaga(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gaga(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gaga(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U13_gaga(N, X, Y, Z, move_out_gaga(M, Z, Y, X)) -> move_out_gaga(N, X, Y, Z) U11_gaag(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_gaag(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) move_in_gaaa(succ(zero), X, Y, X1) -> U1_gaaa(X, Y, X1, write_in_g('Move top disk from ')) U1_gaaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaaa(X, Y, X1, write_in_a(X)) U2_gaaa(X, Y, X1, write_out_a(X)) -> U3_gaaa(X, Y, X1, write_in_g(' to ')) U3_gaaa(X, Y, X1, write_out_g(' to ')) -> U4_gaaa(X, Y, X1, write_in_a(Y)) U4_gaaa(X, Y, X1, write_out_a(Y)) -> U5_gaaa(X, Y, X1, nl_in_) U5_gaaa(X, Y, X1, nl_out_) -> move_out_gaaa(succ(zero), X, Y, X1) move_in_gaaa(N, X, Y, Z) -> U6_gaaa(N, X, Y, Z, =_in_ag(X1, N)) U6_gaaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaaa(N, X, Y, Z, =_in_ag(M, U)) U10_gaaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaaa(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U11_gaaa(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_gaaa(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_gaaa(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaaa(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U13_gaaa(N, X, Y, Z, move_out_gaaa(M, Z, Y, X)) -> move_out_gaaa(N, X, Y, Z) U12_gaag(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaag(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) U13_gaag(N, X, Y, Z, move_out_ggaa(M, Z, Y, X)) -> move_out_gaag(N, X, Y, Z) U13_ggaa(N, X, Y, Z, move_out_gaag(M, Z, Y, X)) -> move_out_ggaa(N, X, Y, Z) U12_ggag(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggag(N, X, Y, Z, move_in_ggag(M, Z, Y, X)) U13_ggag(N, X, Y, Z, move_out_ggag(M, Z, Y, X)) -> move_out_ggag(N, X, Y, Z) U11_ggga(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_ggga(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U12_ggga(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_ggga(N, X, Y, Z, move_in_gagg(M, Z, Y, X)) move_in_gagg(succ(zero), X, Y, X1) -> U1_gagg(X, Y, X1, write_in_g('Move top disk from ')) U1_gagg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gagg(X, Y, X1, write_in_a(X)) U2_gagg(X, Y, X1, write_out_a(X)) -> U3_gagg(X, Y, X1, write_in_g(' to ')) U3_gagg(X, Y, X1, write_out_g(' to ')) -> U4_gagg(X, Y, X1, write_in_g(Y)) U4_gagg(X, Y, X1, write_out_g(Y)) -> U5_gagg(X, Y, X1, nl_in_) U5_gagg(X, Y, X1, nl_out_) -> move_out_gagg(succ(zero), X, Y, X1) move_in_gagg(N, X, Y, Z) -> U6_gagg(N, X, Y, Z, =_in_ag(X1, N)) U6_gagg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gagg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gagg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gagg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gagg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gagg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gagg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gagg(N, X, Y, Z, =_in_ag(M, U)) U10_gagg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gagg(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U11_gagg(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_gagg(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gagg(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gagg(N, X, Y, Z, move_in_ggga(M, Z, Y, X)) U13_gagg(N, X, Y, Z, move_out_ggga(M, Z, Y, X)) -> move_out_gagg(N, X, Y, Z) U13_ggga(N, X, Y, Z, move_out_gagg(M, Z, Y, X)) -> move_out_ggga(N, X, Y, Z) U12_gggg(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_gggg(N, X, Y, Z, move_in_gggg(M, Z, Y, X)) U13_gggg(N, X, Y, Z, move_out_gggg(M, Z, Y, X)) -> move_out_gggg(N, X, Y, Z) The argument filtering Pi contains the following mapping: move_in_gggg(x1, x2, x3, x4) = move_in_gggg(x1, x2, x3, x4) succ(x1) = succ(x1) zero = zero U1_gggg(x1, x2, x3, x4) = U1_gggg(x1, x2, x4) write_in_g(x1) = write_in_g(x1) write_out_g(x1) = write_out_g 'Move top disk from ' = 'Move top disk from ' U2_gggg(x1, x2, x3, x4) = U2_gggg(x2, x4) U3_gggg(x1, x2, x3, x4) = U3_gggg(x2, x4) ' to ' = ' to ' U4_gggg(x1, x2, x3, x4) = U4_gggg(x4) U5_gggg(x1, x2, x3, x4) = U5_gggg(x4) nl_in_ = nl_in_ nl_out_ = nl_out_ move_out_gggg(x1, x2, x3, x4) = move_out_gggg U6_gggg(x1, x2, x3, x4, x5) = U6_gggg(x1, x2, x3, x4, x5) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U7_gggg(x1, x2, x3, x4, x5, x6) = U7_gggg(x1, x2, x3, x4, x5, x6) U8_gggg(x1, x2, x3, x4, x5, x6, x7) = U8_gggg(x1, x2, x3, x4, x7) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U47_gg(x1, x2, x3) = U47_gg(x3) U48_gg(x1, x2, x3) = U48_gg(x3) U9_gggg(x1, x2, x3, x4, x5) = U9_gggg(x2, x3, x4, x5) isMinus_in_gga(x1, x2, x3) = isMinus_in_gga(x1, x2) isMinus_out_gga(x1, x2, x3) = isMinus_out_gga(x3) U18_gga(x1, x2, x3) = U18_gga(x3) U19_gga(x1, x2, x3) = U19_gga(x3) U20_gga(x1, x2, x3, x4) = U20_gga(x4) U21_gga(x1, x2, x3, x4) = U21_gga(x4) U22_gga(x1, x2, x3, x4) = U22_gga(x4) U23_gga(x1, x2, x3, x4) = U23_gga(x4) U10_gggg(x1, x2, x3, x4, x5) = U10_gggg(x2, x3, x4, x5) U11_gggg(x1, x2, x3, x4, x5, x6) = U11_gggg(x2, x3, x4, x5, x6) U12_gggg(x1, x2, x3, x4, x5, x6) = U12_gggg(x2, x3, x4, x5, x6) move_in_ggga(x1, x2, x3, x4) = move_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4) = U1_ggga(x1, x2, x4) U2_ggga(x1, x2, x3, x4) = U2_ggga(x2, x4) U3_ggga(x1, x2, x3, x4) = U3_ggga(x2, x4) U4_ggga(x1, x2, x3, x4) = U4_ggga(x4) U5_ggga(x1, x2, x3, x4) = U5_ggga(x4) move_out_ggga(x1, x2, x3, x4) = move_out_ggga U6_ggga(x1, x2, x3, x4, x5) = U6_ggga(x1, x2, x3, x5) U7_ggga(x1, x2, x3, x4, x5, x6) = U7_ggga(x1, x2, x3, x5, x6) U8_ggga(x1, x2, x3, x4, x5, x6, x7) = U8_ggga(x1, x2, x3, x7) U9_ggga(x1, x2, x3, x4, x5) = U9_ggga(x2, x3, x5) U10_ggga(x1, x2, x3, x4, x5) = U10_ggga(x2, x3, x5) U11_ggga(x1, x2, x3, x4, x5, x6) = U11_ggga(x2, x3, x5, x6) move_in_ggag(x1, x2, x3, x4) = move_in_ggag(x1, x2, x4) U1_ggag(x1, x2, x3, x4) = U1_ggag(x1, x4) U2_ggag(x1, x2, x3, x4) = U2_ggag(x4) U3_ggag(x1, x2, x3, x4) = U3_ggag(x4) U4_ggag(x1, x2, x3, x4) = U4_ggag(x4) write_in_a(x1) = write_in_a write_out_a(x1) = write_out_a U5_ggag(x1, x2, x3, x4) = U5_ggag(x4) move_out_ggag(x1, x2, x3, x4) = move_out_ggag U6_ggag(x1, x2, x3, x4, x5) = U6_ggag(x1, x2, x4, x5) U7_ggag(x1, x2, x3, x4, x5, x6) = U7_ggag(x1, x2, x4, x5, x6) U8_ggag(x1, x2, x3, x4, x5, x6, x7) = U8_ggag(x1, x2, x4, x7) U9_ggag(x1, x2, x3, x4, x5) = U9_ggag(x2, x4, x5) U10_ggag(x1, x2, x3, x4, x5) = U10_ggag(x2, x4, x5) U11_ggag(x1, x2, x3, x4, x5, x6) = U11_ggag(x2, x4, x5, x6) U12_ggag(x1, x2, x3, x4, x5, x6) = U12_ggag(x2, x4, x5, x6) move_in_ggaa(x1, x2, x3, x4) = move_in_ggaa(x1, x2) U1_ggaa(x1, x2, x3, x4) = U1_ggaa(x1, x4) U2_ggaa(x1, x2, x3, x4) = U2_ggaa(x4) U3_ggaa(x1, x2, x3, x4) = U3_ggaa(x4) U4_ggaa(x1, x2, x3, x4) = U4_ggaa(x4) U5_ggaa(x1, x2, x3, x4) = U5_ggaa(x4) move_out_ggaa(x1, x2, x3, x4) = move_out_ggaa U6_ggaa(x1, x2, x3, x4, x5) = U6_ggaa(x1, x2, x5) U7_ggaa(x1, x2, x3, x4, x5, x6) = U7_ggaa(x1, x2, x5, x6) U8_ggaa(x1, x2, x3, x4, x5, x6, x7) = U8_ggaa(x1, x2, x7) U9_ggaa(x1, x2, x3, x4, x5) = U9_ggaa(x2, x5) U10_ggaa(x1, x2, x3, x4, x5) = U10_ggaa(x2, x5) U11_ggaa(x1, x2, x3, x4, x5, x6) = U11_ggaa(x2, x5, x6) U12_ggaa(x1, x2, x3, x4, x5, x6) = U12_ggaa(x2, x5, x6) U13_ggaa(x1, x2, x3, x4, x5) = U13_ggaa(x5) move_in_gaag(x1, x2, x3, x4) = move_in_gaag(x1, x4) U1_gaag(x1, x2, x3, x4) = U1_gaag(x4) U2_gaag(x1, x2, x3, x4) = U2_gaag(x4) U3_gaag(x1, x2, x3, x4) = U3_gaag(x4) U4_gaag(x1, x2, x3, x4) = U4_gaag(x4) U5_gaag(x1, x2, x3, x4) = U5_gaag(x4) move_out_gaag(x1, x2, x3, x4) = move_out_gaag U6_gaag(x1, x2, x3, x4, x5) = U6_gaag(x1, x4, x5) U7_gaag(x1, x2, x3, x4, x5, x6) = U7_gaag(x1, x4, x5, x6) U8_gaag(x1, x2, x3, x4, x5, x6, x7) = U8_gaag(x1, x4, x7) U9_gaag(x1, x2, x3, x4, x5) = U9_gaag(x4, x5) U10_gaag(x1, x2, x3, x4, x5) = U10_gaag(x4, x5) U11_gaag(x1, x2, x3, x4, x5, x6) = U11_gaag(x4, x5, x6) move_in_gaga(x1, x2, x3, x4) = move_in_gaga(x1, x3) U1_gaga(x1, x2, x3, x4) = U1_gaga(x2, x4) U2_gaga(x1, x2, x3, x4) = U2_gaga(x2, x4) U3_gaga(x1, x2, x3, x4) = U3_gaga(x2, x4) U4_gaga(x1, x2, x3, x4) = U4_gaga(x4) U5_gaga(x1, x2, x3, x4) = U5_gaga(x4) move_out_gaga(x1, x2, x3, x4) = move_out_gaga U6_gaga(x1, x2, x3, x4, x5) = U6_gaga(x1, x3, x5) U7_gaga(x1, x2, x3, x4, x5, x6) = U7_gaga(x1, x3, x5, x6) U8_gaga(x1, x2, x3, x4, x5, x6, x7) = U8_gaga(x1, x3, x7) U9_gaga(x1, x2, x3, x4, x5) = U9_gaga(x3, x5) U10_gaga(x1, x2, x3, x4, x5) = U10_gaga(x3, x5) U11_gaga(x1, x2, x3, x4, x5, x6) = U11_gaga(x3, x5, x6) U12_gaga(x1, x2, x3, x4, x5, x6) = U12_gaga(x3, x5, x6) U13_gaga(x1, x2, x3, x4, x5) = U13_gaga(x5) U12_gaag(x1, x2, x3, x4, x5, x6) = U12_gaag(x4, x5, x6) move_in_gaaa(x1, x2, x3, x4) = move_in_gaaa(x1) U1_gaaa(x1, x2, x3, x4) = U1_gaaa(x4) U2_gaaa(x1, x2, x3, x4) = U2_gaaa(x4) U3_gaaa(x1, x2, x3, x4) = U3_gaaa(x4) U4_gaaa(x1, x2, x3, x4) = U4_gaaa(x4) U5_gaaa(x1, x2, x3, x4) = U5_gaaa(x4) move_out_gaaa(x1, x2, x3, x4) = move_out_gaaa U6_gaaa(x1, x2, x3, x4, x5) = U6_gaaa(x1, x5) U7_gaaa(x1, x2, x3, x4, x5, x6) = U7_gaaa(x1, x5, x6) U8_gaaa(x1, x2, x3, x4, x5, x6, x7) = U8_gaaa(x1, x7) U9_gaaa(x1, x2, x3, x4, x5) = U9_gaaa(x5) U10_gaaa(x1, x2, x3, x4, x5) = U10_gaaa(x5) U11_gaaa(x1, x2, x3, x4, x5, x6) = U11_gaaa(x5, x6) U12_gaaa(x1, x2, x3, x4, x5, x6) = U12_gaaa(x5, x6) U13_gaaa(x1, x2, x3, x4, x5) = U13_gaaa(x5) U13_gaag(x1, x2, x3, x4, x5) = U13_gaag(x5) U13_ggag(x1, x2, x3, x4, x5) = U13_ggag(x5) U12_ggga(x1, x2, x3, x4, x5, x6) = U12_ggga(x2, x3, x5, x6) U13_ggga(x1, x2, x3, x4, x5) = U13_ggga(x5) move_in_gagg(x1, x2, x3, x4) = move_in_gagg(x1, x3, x4) U1_gagg(x1, x2, x3, x4) = U1_gagg(x2, x4) U2_gagg(x1, x2, x3, x4) = U2_gagg(x2, x4) U3_gagg(x1, x2, x3, x4) = U3_gagg(x2, x4) U4_gagg(x1, x2, x3, x4) = U4_gagg(x4) U5_gagg(x1, x2, x3, x4) = U5_gagg(x4) move_out_gagg(x1, x2, x3, x4) = move_out_gagg U6_gagg(x1, x2, x3, x4, x5) = U6_gagg(x1, x3, x4, x5) U7_gagg(x1, x2, x3, x4, x5, x6) = U7_gagg(x1, x3, x4, x5, x6) U8_gagg(x1, x2, x3, x4, x5, x6, x7) = U8_gagg(x1, x3, x4, x7) U9_gagg(x1, x2, x3, x4, x5) = U9_gagg(x3, x4, x5) U10_gagg(x1, x2, x3, x4, x5) = U10_gagg(x3, x4, x5) U11_gagg(x1, x2, x3, x4, x5, x6) = U11_gagg(x3, x4, x5, x6) U12_gagg(x1, x2, x3, x4, x5, x6) = U12_gagg(x3, x4, x5, x6) U13_gagg(x1, x2, x3, x4, x5) = U13_gagg(x5) U13_gggg(x1, x2, x3, x4, x5) = U13_gggg(x5) ISGREATER_IN_GG(x1, x2) = ISGREATER_IN_GG(x1, x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (28) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (29) Obligation: Pi DP problem: The TRS P consists of the following rules: ISGREATER_IN_GG(pred(X), pred(Y)) -> ISGREATER_IN_GG(X, Y) ISGREATER_IN_GG(succ(X), succ(Y)) -> ISGREATER_IN_GG(X, Y) R is empty. Pi is empty. We have to consider all (P,R,Pi)-chains ---------------------------------------- (30) PiDPToQDPProof (EQUIVALENT) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (31) Obligation: Q DP problem: The TRS P consists of the following rules: ISGREATER_IN_GG(pred(X), pred(Y)) -> ISGREATER_IN_GG(X, Y) ISGREATER_IN_GG(succ(X), succ(Y)) -> ISGREATER_IN_GG(X, Y) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (32) 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: *ISGREATER_IN_GG(pred(X), pred(Y)) -> ISGREATER_IN_GG(X, Y) The graph contains the following edges 1 > 1, 2 > 2 *ISGREATER_IN_GG(succ(X), succ(Y)) -> ISGREATER_IN_GG(X, Y) The graph contains the following edges 1 > 1, 2 > 2 ---------------------------------------- (33) YES ---------------------------------------- (34) Obligation: Pi DP problem: The TRS P consists of the following rules: U7_GAAA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAAA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GAAA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAAA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GAAA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAAA(N, X, Y, Z, =_in_ag(M, U)) U10_GAAA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAAA(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U11_GAAA(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_GAAA(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_GAAA(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> MOVE_IN_GAAA(M, Z, Y, X) MOVE_IN_GAAA(N, X, Y, Z) -> U6_GAAA(N, X, Y, Z, =_in_ag(X1, N)) U6_GAAA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAAA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U11_GAAA(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> MOVE_IN_GAAA(succ(zero), X, Y, X2) U10_GAAA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAAA(M, X, Z, Y) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, X1, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g(X0) U1_gggg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gggg(X, Y, X1, write_in_g(X)) U2_gggg(X, Y, X1, write_out_g(X)) -> U3_gggg(X, Y, X1, write_in_g(' to ')) U3_gggg(X, Y, X1, write_out_g(' to ')) -> U4_gggg(X, Y, X1, write_in_g(Y)) U4_gggg(X, Y, X1, write_out_g(Y)) -> U5_gggg(X, Y, X1, nl_in_) nl_in_ -> nl_out_ U5_gggg(X, Y, X1, nl_out_) -> move_out_gggg(succ(zero), X, Y, X1) move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(X1, N)) =_in_ag(X, X) -> =_out_ag(X, X) U6_gggg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gggg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg(succ(X), zero) isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg(succ(X), pred(Y)) isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(X, Y, isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg(zero, pred(Y)) isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(X, Y, isGreater_in_gg(X, Y)) U48_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U47_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U8_gggg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gggg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) isMinus_in_gga(X, zero, X) -> isMinus_out_gga(X, zero, X) isMinus_in_gga(zero, succ(Y), pred(Z)) -> U18_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(zero, pred(Y), succ(Z)) -> U19_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), succ(Y), Z) -> U20_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(succ(X), pred(Y), succ(succ(Z))) -> U21_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), succ(Y), pred(pred(Z))) -> U22_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), pred(Y), Z) -> U23_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) U23_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), pred(Y), Z) U22_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), succ(Y), pred(pred(Z))) U21_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), pred(Y), succ(succ(Z))) U20_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), succ(Y), Z) U19_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, pred(Y), succ(Z)) U18_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, succ(Y), pred(Z)) U9_gggg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gggg(N, X, Y, Z, =_in_ag(M, U)) U10_gggg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gggg(N, X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> U12_gggg(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) move_in_ggga(succ(zero), X, Y, X1) -> U1_ggga(X, Y, X1, write_in_g('Move top disk from ')) U1_ggga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggga(X, Y, X1, write_in_g(X)) U2_ggga(X, Y, X1, write_out_g(X)) -> U3_ggga(X, Y, X1, write_in_g(' to ')) U3_ggga(X, Y, X1, write_out_g(' to ')) -> U4_ggga(X, Y, X1, write_in_g(Y)) U4_ggga(X, Y, X1, write_out_g(Y)) -> U5_ggga(X, Y, X1, nl_in_) U5_ggga(X, Y, X1, nl_out_) -> move_out_ggga(succ(zero), X, Y, X1) move_in_ggga(N, X, Y, Z) -> U6_ggga(N, X, Y, Z, =_in_ag(X1, N)) U6_ggga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggga(N, X, Y, Z, =_in_ag(M, U)) U10_ggga(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggga(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) move_in_ggag(succ(zero), X, Y, X1) -> U1_ggag(X, Y, X1, write_in_g('Move top disk from ')) U1_ggag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggag(X, Y, X1, write_in_g(X)) U2_ggag(X, Y, X1, write_out_g(X)) -> U3_ggag(X, Y, X1, write_in_g(' to ')) U3_ggag(X, Y, X1, write_out_g(' to ')) -> U4_ggag(X, Y, X1, write_in_a(Y)) write_in_a(X0) -> write_out_a(X0) U4_ggag(X, Y, X1, write_out_a(Y)) -> U5_ggag(X, Y, X1, nl_in_) U5_ggag(X, Y, X1, nl_out_) -> move_out_ggag(succ(zero), X, Y, X1) move_in_ggag(N, X, Y, Z) -> U6_ggag(N, X, Y, Z, =_in_ag(X1, N)) U6_ggag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggag(N, X, Y, Z, =_in_ag(M, U)) U10_ggag(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggag(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U11_ggag(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_ggag(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) move_in_ggaa(succ(zero), X, Y, X1) -> U1_ggaa(X, Y, X1, write_in_g('Move top disk from ')) U1_ggaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggaa(X, Y, X1, write_in_g(X)) U2_ggaa(X, Y, X1, write_out_g(X)) -> U3_ggaa(X, Y, X1, write_in_g(' to ')) U3_ggaa(X, Y, X1, write_out_g(' to ')) -> U4_ggaa(X, Y, X1, write_in_a(Y)) U4_ggaa(X, Y, X1, write_out_a(Y)) -> U5_ggaa(X, Y, X1, nl_in_) U5_ggaa(X, Y, X1, nl_out_) -> move_out_ggaa(succ(zero), X, Y, X1) move_in_ggaa(N, X, Y, Z) -> U6_ggaa(N, X, Y, Z, =_in_ag(X1, N)) U6_ggaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggaa(N, X, Y, Z, =_in_ag(M, U)) U10_ggaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggaa(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U11_ggaa(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_ggaa(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_ggaa(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggaa(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) move_in_gaag(succ(zero), X, Y, X1) -> U1_gaag(X, Y, X1, write_in_g('Move top disk from ')) U1_gaag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaag(X, Y, X1, write_in_a(X)) U2_gaag(X, Y, X1, write_out_a(X)) -> U3_gaag(X, Y, X1, write_in_g(' to ')) U3_gaag(X, Y, X1, write_out_g(' to ')) -> U4_gaag(X, Y, X1, write_in_a(Y)) U4_gaag(X, Y, X1, write_out_a(Y)) -> U5_gaag(X, Y, X1, nl_in_) U5_gaag(X, Y, X1, nl_out_) -> move_out_gaag(succ(zero), X, Y, X1) move_in_gaag(N, X, Y, Z) -> U6_gaag(N, X, Y, Z, =_in_ag(X1, N)) U6_gaag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaag(N, X, Y, Z, =_in_ag(M, U)) U10_gaag(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaag(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) move_in_gaga(succ(zero), X, Y, X1) -> U1_gaga(X, Y, X1, write_in_g('Move top disk from ')) U1_gaga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaga(X, Y, X1, write_in_a(X)) U2_gaga(X, Y, X1, write_out_a(X)) -> U3_gaga(X, Y, X1, write_in_g(' to ')) U3_gaga(X, Y, X1, write_out_g(' to ')) -> U4_gaga(X, Y, X1, write_in_g(Y)) U4_gaga(X, Y, X1, write_out_g(Y)) -> U5_gaga(X, Y, X1, nl_in_) U5_gaga(X, Y, X1, nl_out_) -> move_out_gaga(succ(zero), X, Y, X1) move_in_gaga(N, X, Y, Z) -> U6_gaga(N, X, Y, Z, =_in_ag(X1, N)) U6_gaga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaga(N, X, Y, Z, =_in_ag(M, U)) U10_gaga(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaga(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U11_gaga(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_gaga(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gaga(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gaga(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U13_gaga(N, X, Y, Z, move_out_gaga(M, Z, Y, X)) -> move_out_gaga(N, X, Y, Z) U11_gaag(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_gaag(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) move_in_gaaa(succ(zero), X, Y, X1) -> U1_gaaa(X, Y, X1, write_in_g('Move top disk from ')) U1_gaaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaaa(X, Y, X1, write_in_a(X)) U2_gaaa(X, Y, X1, write_out_a(X)) -> U3_gaaa(X, Y, X1, write_in_g(' to ')) U3_gaaa(X, Y, X1, write_out_g(' to ')) -> U4_gaaa(X, Y, X1, write_in_a(Y)) U4_gaaa(X, Y, X1, write_out_a(Y)) -> U5_gaaa(X, Y, X1, nl_in_) U5_gaaa(X, Y, X1, nl_out_) -> move_out_gaaa(succ(zero), X, Y, X1) move_in_gaaa(N, X, Y, Z) -> U6_gaaa(N, X, Y, Z, =_in_ag(X1, N)) U6_gaaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaaa(N, X, Y, Z, =_in_ag(M, U)) U10_gaaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaaa(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U11_gaaa(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_gaaa(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_gaaa(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaaa(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U13_gaaa(N, X, Y, Z, move_out_gaaa(M, Z, Y, X)) -> move_out_gaaa(N, X, Y, Z) U12_gaag(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaag(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) U13_gaag(N, X, Y, Z, move_out_ggaa(M, Z, Y, X)) -> move_out_gaag(N, X, Y, Z) U13_ggaa(N, X, Y, Z, move_out_gaag(M, Z, Y, X)) -> move_out_ggaa(N, X, Y, Z) U12_ggag(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggag(N, X, Y, Z, move_in_ggag(M, Z, Y, X)) U13_ggag(N, X, Y, Z, move_out_ggag(M, Z, Y, X)) -> move_out_ggag(N, X, Y, Z) U11_ggga(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_ggga(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U12_ggga(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_ggga(N, X, Y, Z, move_in_gagg(M, Z, Y, X)) move_in_gagg(succ(zero), X, Y, X1) -> U1_gagg(X, Y, X1, write_in_g('Move top disk from ')) U1_gagg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gagg(X, Y, X1, write_in_a(X)) U2_gagg(X, Y, X1, write_out_a(X)) -> U3_gagg(X, Y, X1, write_in_g(' to ')) U3_gagg(X, Y, X1, write_out_g(' to ')) -> U4_gagg(X, Y, X1, write_in_g(Y)) U4_gagg(X, Y, X1, write_out_g(Y)) -> U5_gagg(X, Y, X1, nl_in_) U5_gagg(X, Y, X1, nl_out_) -> move_out_gagg(succ(zero), X, Y, X1) move_in_gagg(N, X, Y, Z) -> U6_gagg(N, X, Y, Z, =_in_ag(X1, N)) U6_gagg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gagg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gagg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gagg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gagg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gagg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gagg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gagg(N, X, Y, Z, =_in_ag(M, U)) U10_gagg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gagg(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U11_gagg(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_gagg(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gagg(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gagg(N, X, Y, Z, move_in_ggga(M, Z, Y, X)) U13_gagg(N, X, Y, Z, move_out_ggga(M, Z, Y, X)) -> move_out_gagg(N, X, Y, Z) U13_ggga(N, X, Y, Z, move_out_gagg(M, Z, Y, X)) -> move_out_ggga(N, X, Y, Z) U12_gggg(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_gggg(N, X, Y, Z, move_in_gggg(M, Z, Y, X)) U13_gggg(N, X, Y, Z, move_out_gggg(M, Z, Y, X)) -> move_out_gggg(N, X, Y, Z) The argument filtering Pi contains the following mapping: move_in_gggg(x1, x2, x3, x4) = move_in_gggg(x1, x2, x3, x4) succ(x1) = succ(x1) zero = zero U1_gggg(x1, x2, x3, x4) = U1_gggg(x1, x2, x4) write_in_g(x1) = write_in_g(x1) write_out_g(x1) = write_out_g 'Move top disk from ' = 'Move top disk from ' U2_gggg(x1, x2, x3, x4) = U2_gggg(x2, x4) U3_gggg(x1, x2, x3, x4) = U3_gggg(x2, x4) ' to ' = ' to ' U4_gggg(x1, x2, x3, x4) = U4_gggg(x4) U5_gggg(x1, x2, x3, x4) = U5_gggg(x4) nl_in_ = nl_in_ nl_out_ = nl_out_ move_out_gggg(x1, x2, x3, x4) = move_out_gggg U6_gggg(x1, x2, x3, x4, x5) = U6_gggg(x1, x2, x3, x4, x5) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U7_gggg(x1, x2, x3, x4, x5, x6) = U7_gggg(x1, x2, x3, x4, x5, x6) U8_gggg(x1, x2, x3, x4, x5, x6, x7) = U8_gggg(x1, x2, x3, x4, x7) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U47_gg(x1, x2, x3) = U47_gg(x3) U48_gg(x1, x2, x3) = U48_gg(x3) U9_gggg(x1, x2, x3, x4, x5) = U9_gggg(x2, x3, x4, x5) isMinus_in_gga(x1, x2, x3) = isMinus_in_gga(x1, x2) isMinus_out_gga(x1, x2, x3) = isMinus_out_gga(x3) U18_gga(x1, x2, x3) = U18_gga(x3) U19_gga(x1, x2, x3) = U19_gga(x3) U20_gga(x1, x2, x3, x4) = U20_gga(x4) U21_gga(x1, x2, x3, x4) = U21_gga(x4) U22_gga(x1, x2, x3, x4) = U22_gga(x4) U23_gga(x1, x2, x3, x4) = U23_gga(x4) U10_gggg(x1, x2, x3, x4, x5) = U10_gggg(x2, x3, x4, x5) U11_gggg(x1, x2, x3, x4, x5, x6) = U11_gggg(x2, x3, x4, x5, x6) U12_gggg(x1, x2, x3, x4, x5, x6) = U12_gggg(x2, x3, x4, x5, x6) move_in_ggga(x1, x2, x3, x4) = move_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4) = U1_ggga(x1, x2, x4) U2_ggga(x1, x2, x3, x4) = U2_ggga(x2, x4) U3_ggga(x1, x2, x3, x4) = U3_ggga(x2, x4) U4_ggga(x1, x2, x3, x4) = U4_ggga(x4) U5_ggga(x1, x2, x3, x4) = U5_ggga(x4) move_out_ggga(x1, x2, x3, x4) = move_out_ggga U6_ggga(x1, x2, x3, x4, x5) = U6_ggga(x1, x2, x3, x5) U7_ggga(x1, x2, x3, x4, x5, x6) = U7_ggga(x1, x2, x3, x5, x6) U8_ggga(x1, x2, x3, x4, x5, x6, x7) = U8_ggga(x1, x2, x3, x7) U9_ggga(x1, x2, x3, x4, x5) = U9_ggga(x2, x3, x5) U10_ggga(x1, x2, x3, x4, x5) = U10_ggga(x2, x3, x5) U11_ggga(x1, x2, x3, x4, x5, x6) = U11_ggga(x2, x3, x5, x6) move_in_ggag(x1, x2, x3, x4) = move_in_ggag(x1, x2, x4) U1_ggag(x1, x2, x3, x4) = U1_ggag(x1, x4) U2_ggag(x1, x2, x3, x4) = U2_ggag(x4) U3_ggag(x1, x2, x3, x4) = U3_ggag(x4) U4_ggag(x1, x2, x3, x4) = U4_ggag(x4) write_in_a(x1) = write_in_a write_out_a(x1) = write_out_a U5_ggag(x1, x2, x3, x4) = U5_ggag(x4) move_out_ggag(x1, x2, x3, x4) = move_out_ggag U6_ggag(x1, x2, x3, x4, x5) = U6_ggag(x1, x2, x4, x5) U7_ggag(x1, x2, x3, x4, x5, x6) = U7_ggag(x1, x2, x4, x5, x6) U8_ggag(x1, x2, x3, x4, x5, x6, x7) = U8_ggag(x1, x2, x4, x7) U9_ggag(x1, x2, x3, x4, x5) = U9_ggag(x2, x4, x5) U10_ggag(x1, x2, x3, x4, x5) = U10_ggag(x2, x4, x5) U11_ggag(x1, x2, x3, x4, x5, x6) = U11_ggag(x2, x4, x5, x6) U12_ggag(x1, x2, x3, x4, x5, x6) = U12_ggag(x2, x4, x5, x6) move_in_ggaa(x1, x2, x3, x4) = move_in_ggaa(x1, x2) U1_ggaa(x1, x2, x3, x4) = U1_ggaa(x1, x4) U2_ggaa(x1, x2, x3, x4) = U2_ggaa(x4) U3_ggaa(x1, x2, x3, x4) = U3_ggaa(x4) U4_ggaa(x1, x2, x3, x4) = U4_ggaa(x4) U5_ggaa(x1, x2, x3, x4) = U5_ggaa(x4) move_out_ggaa(x1, x2, x3, x4) = move_out_ggaa U6_ggaa(x1, x2, x3, x4, x5) = U6_ggaa(x1, x2, x5) U7_ggaa(x1, x2, x3, x4, x5, x6) = U7_ggaa(x1, x2, x5, x6) U8_ggaa(x1, x2, x3, x4, x5, x6, x7) = U8_ggaa(x1, x2, x7) U9_ggaa(x1, x2, x3, x4, x5) = U9_ggaa(x2, x5) U10_ggaa(x1, x2, x3, x4, x5) = U10_ggaa(x2, x5) U11_ggaa(x1, x2, x3, x4, x5, x6) = U11_ggaa(x2, x5, x6) U12_ggaa(x1, x2, x3, x4, x5, x6) = U12_ggaa(x2, x5, x6) U13_ggaa(x1, x2, x3, x4, x5) = U13_ggaa(x5) move_in_gaag(x1, x2, x3, x4) = move_in_gaag(x1, x4) U1_gaag(x1, x2, x3, x4) = U1_gaag(x4) U2_gaag(x1, x2, x3, x4) = U2_gaag(x4) U3_gaag(x1, x2, x3, x4) = U3_gaag(x4) U4_gaag(x1, x2, x3, x4) = U4_gaag(x4) U5_gaag(x1, x2, x3, x4) = U5_gaag(x4) move_out_gaag(x1, x2, x3, x4) = move_out_gaag U6_gaag(x1, x2, x3, x4, x5) = U6_gaag(x1, x4, x5) U7_gaag(x1, x2, x3, x4, x5, x6) = U7_gaag(x1, x4, x5, x6) U8_gaag(x1, x2, x3, x4, x5, x6, x7) = U8_gaag(x1, x4, x7) U9_gaag(x1, x2, x3, x4, x5) = U9_gaag(x4, x5) U10_gaag(x1, x2, x3, x4, x5) = U10_gaag(x4, x5) U11_gaag(x1, x2, x3, x4, x5, x6) = U11_gaag(x4, x5, x6) move_in_gaga(x1, x2, x3, x4) = move_in_gaga(x1, x3) U1_gaga(x1, x2, x3, x4) = U1_gaga(x2, x4) U2_gaga(x1, x2, x3, x4) = U2_gaga(x2, x4) U3_gaga(x1, x2, x3, x4) = U3_gaga(x2, x4) U4_gaga(x1, x2, x3, x4) = U4_gaga(x4) U5_gaga(x1, x2, x3, x4) = U5_gaga(x4) move_out_gaga(x1, x2, x3, x4) = move_out_gaga U6_gaga(x1, x2, x3, x4, x5) = U6_gaga(x1, x3, x5) U7_gaga(x1, x2, x3, x4, x5, x6) = U7_gaga(x1, x3, x5, x6) U8_gaga(x1, x2, x3, x4, x5, x6, x7) = U8_gaga(x1, x3, x7) U9_gaga(x1, x2, x3, x4, x5) = U9_gaga(x3, x5) U10_gaga(x1, x2, x3, x4, x5) = U10_gaga(x3, x5) U11_gaga(x1, x2, x3, x4, x5, x6) = U11_gaga(x3, x5, x6) U12_gaga(x1, x2, x3, x4, x5, x6) = U12_gaga(x3, x5, x6) U13_gaga(x1, x2, x3, x4, x5) = U13_gaga(x5) U12_gaag(x1, x2, x3, x4, x5, x6) = U12_gaag(x4, x5, x6) move_in_gaaa(x1, x2, x3, x4) = move_in_gaaa(x1) U1_gaaa(x1, x2, x3, x4) = U1_gaaa(x4) U2_gaaa(x1, x2, x3, x4) = U2_gaaa(x4) U3_gaaa(x1, x2, x3, x4) = U3_gaaa(x4) U4_gaaa(x1, x2, x3, x4) = U4_gaaa(x4) U5_gaaa(x1, x2, x3, x4) = U5_gaaa(x4) move_out_gaaa(x1, x2, x3, x4) = move_out_gaaa U6_gaaa(x1, x2, x3, x4, x5) = U6_gaaa(x1, x5) U7_gaaa(x1, x2, x3, x4, x5, x6) = U7_gaaa(x1, x5, x6) U8_gaaa(x1, x2, x3, x4, x5, x6, x7) = U8_gaaa(x1, x7) U9_gaaa(x1, x2, x3, x4, x5) = U9_gaaa(x5) U10_gaaa(x1, x2, x3, x4, x5) = U10_gaaa(x5) U11_gaaa(x1, x2, x3, x4, x5, x6) = U11_gaaa(x5, x6) U12_gaaa(x1, x2, x3, x4, x5, x6) = U12_gaaa(x5, x6) U13_gaaa(x1, x2, x3, x4, x5) = U13_gaaa(x5) U13_gaag(x1, x2, x3, x4, x5) = U13_gaag(x5) U13_ggag(x1, x2, x3, x4, x5) = U13_ggag(x5) U12_ggga(x1, x2, x3, x4, x5, x6) = U12_ggga(x2, x3, x5, x6) U13_ggga(x1, x2, x3, x4, x5) = U13_ggga(x5) move_in_gagg(x1, x2, x3, x4) = move_in_gagg(x1, x3, x4) U1_gagg(x1, x2, x3, x4) = U1_gagg(x2, x4) U2_gagg(x1, x2, x3, x4) = U2_gagg(x2, x4) U3_gagg(x1, x2, x3, x4) = U3_gagg(x2, x4) U4_gagg(x1, x2, x3, x4) = U4_gagg(x4) U5_gagg(x1, x2, x3, x4) = U5_gagg(x4) move_out_gagg(x1, x2, x3, x4) = move_out_gagg U6_gagg(x1, x2, x3, x4, x5) = U6_gagg(x1, x3, x4, x5) U7_gagg(x1, x2, x3, x4, x5, x6) = U7_gagg(x1, x3, x4, x5, x6) U8_gagg(x1, x2, x3, x4, x5, x6, x7) = U8_gagg(x1, x3, x4, x7) U9_gagg(x1, x2, x3, x4, x5) = U9_gagg(x3, x4, x5) U10_gagg(x1, x2, x3, x4, x5) = U10_gagg(x3, x4, x5) U11_gagg(x1, x2, x3, x4, x5, x6) = U11_gagg(x3, x4, x5, x6) U12_gagg(x1, x2, x3, x4, x5, x6) = U12_gagg(x3, x4, x5, x6) U13_gagg(x1, x2, x3, x4, x5) = U13_gagg(x5) U13_gggg(x1, x2, x3, x4, x5) = U13_gggg(x5) MOVE_IN_GAAA(x1, x2, x3, x4) = MOVE_IN_GAAA(x1) U6_GAAA(x1, x2, x3, x4, x5) = U6_GAAA(x1, x5) U7_GAAA(x1, x2, x3, x4, x5, x6) = U7_GAAA(x1, x5, x6) U8_GAAA(x1, x2, x3, x4, x5, x6, x7) = U8_GAAA(x1, x7) U9_GAAA(x1, x2, x3, x4, x5) = U9_GAAA(x5) U10_GAAA(x1, x2, x3, x4, x5) = U10_GAAA(x5) U11_GAAA(x1, x2, x3, x4, x5, x6) = U11_GAAA(x5, x6) U12_GAAA(x1, x2, x3, x4, x5, x6) = U12_GAAA(x5, x6) We have to consider all (P,R,Pi)-chains ---------------------------------------- (35) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (36) Obligation: Pi DP problem: The TRS P consists of the following rules: U7_GAAA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAAA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GAAA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAAA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GAAA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAAA(N, X, Y, Z, =_in_ag(M, U)) U10_GAAA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAAA(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U11_GAAA(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_GAAA(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_GAAA(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> MOVE_IN_GAAA(M, Z, Y, X) MOVE_IN_GAAA(N, X, Y, Z) -> U6_GAAA(N, X, Y, Z, =_in_ag(X1, N)) U6_GAAA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAAA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U11_GAAA(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> MOVE_IN_GAAA(succ(zero), X, Y, X2) U10_GAAA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAAA(M, X, Z, Y) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg(succ(X), zero) isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg(succ(X), pred(Y)) isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(X, Y, isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg(zero, pred(Y)) isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(X, Y, isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y), pred(Z)) -> U18_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), succ(Y), Z) -> U20_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), succ(Y), pred(pred(Z))) -> U22_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) =_in_ag(X, X) -> =_out_ag(X, X) move_in_gaaa(succ(zero), X, Y, X1) -> U1_gaaa(X, Y, X1, write_in_g('Move top disk from ')) move_in_gaaa(N, X, Y, Z) -> U6_gaaa(N, X, Y, Z, =_in_ag(X1, N)) U47_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U48_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U18_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, succ(Y), pred(Z)) U20_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), succ(Y), Z) U22_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), succ(Y), pred(pred(Z))) U1_gaaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaaa(X, Y, X1, write_in_a(X)) U6_gaaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) isMinus_in_gga(X, zero, X) -> isMinus_out_gga(X, zero, X) isMinus_in_gga(zero, pred(Y), succ(Z)) -> U19_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), pred(Y), succ(succ(Z))) -> U21_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), pred(Y), Z) -> U23_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) write_in_g(X0) -> write_out_g(X0) U2_gaaa(X, Y, X1, write_out_a(X)) -> U3_gaaa(X, Y, X1, write_in_g(' to ')) U7_gaaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U19_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, pred(Y), succ(Z)) U21_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), pred(Y), succ(succ(Z))) U23_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), pred(Y), Z) write_in_a(X0) -> write_out_a(X0) U3_gaaa(X, Y, X1, write_out_g(' to ')) -> U4_gaaa(X, Y, X1, write_in_a(Y)) U8_gaaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U4_gaaa(X, Y, X1, write_out_a(Y)) -> U5_gaaa(X, Y, X1, nl_in_) U9_gaaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaaa(N, X, Y, Z, =_in_ag(M, U)) U5_gaaa(X, Y, X1, nl_out_) -> move_out_gaaa(succ(zero), X, Y, X1) U10_gaaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaaa(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) nl_in_ -> nl_out_ U11_gaaa(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_gaaa(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_gaaa(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaaa(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U13_gaaa(N, X, Y, Z, move_out_gaaa(M, Z, Y, X)) -> move_out_gaaa(N, X, Y, Z) The argument filtering Pi contains the following mapping: succ(x1) = succ(x1) zero = zero write_in_g(x1) = write_in_g(x1) write_out_g(x1) = write_out_g 'Move top disk from ' = 'Move top disk from ' ' to ' = ' to ' nl_in_ = nl_in_ nl_out_ = nl_out_ =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U47_gg(x1, x2, x3) = U47_gg(x3) U48_gg(x1, x2, x3) = U48_gg(x3) isMinus_in_gga(x1, x2, x3) = isMinus_in_gga(x1, x2) isMinus_out_gga(x1, x2, x3) = isMinus_out_gga(x3) U18_gga(x1, x2, x3) = U18_gga(x3) U19_gga(x1, x2, x3) = U19_gga(x3) U20_gga(x1, x2, x3, x4) = U20_gga(x4) U21_gga(x1, x2, x3, x4) = U21_gga(x4) U22_gga(x1, x2, x3, x4) = U22_gga(x4) U23_gga(x1, x2, x3, x4) = U23_gga(x4) write_in_a(x1) = write_in_a write_out_a(x1) = write_out_a move_in_gaaa(x1, x2, x3, x4) = move_in_gaaa(x1) U1_gaaa(x1, x2, x3, x4) = U1_gaaa(x4) U2_gaaa(x1, x2, x3, x4) = U2_gaaa(x4) U3_gaaa(x1, x2, x3, x4) = U3_gaaa(x4) U4_gaaa(x1, x2, x3, x4) = U4_gaaa(x4) U5_gaaa(x1, x2, x3, x4) = U5_gaaa(x4) move_out_gaaa(x1, x2, x3, x4) = move_out_gaaa U6_gaaa(x1, x2, x3, x4, x5) = U6_gaaa(x1, x5) U7_gaaa(x1, x2, x3, x4, x5, x6) = U7_gaaa(x1, x5, x6) U8_gaaa(x1, x2, x3, x4, x5, x6, x7) = U8_gaaa(x1, x7) U9_gaaa(x1, x2, x3, x4, x5) = U9_gaaa(x5) U10_gaaa(x1, x2, x3, x4, x5) = U10_gaaa(x5) U11_gaaa(x1, x2, x3, x4, x5, x6) = U11_gaaa(x5, x6) U12_gaaa(x1, x2, x3, x4, x5, x6) = U12_gaaa(x5, x6) U13_gaaa(x1, x2, x3, x4, x5) = U13_gaaa(x5) MOVE_IN_GAAA(x1, x2, x3, x4) = MOVE_IN_GAAA(x1) U6_GAAA(x1, x2, x3, x4, x5) = U6_GAAA(x1, x5) U7_GAAA(x1, x2, x3, x4, x5, x6) = U7_GAAA(x1, x5, x6) U8_GAAA(x1, x2, x3, x4, x5, x6, x7) = U8_GAAA(x1, x7) U9_GAAA(x1, x2, x3, x4, x5) = U9_GAAA(x5) U10_GAAA(x1, x2, x3, x4, x5) = U10_GAAA(x5) U11_GAAA(x1, x2, x3, x4, x5, x6) = U11_GAAA(x5, x6) U12_GAAA(x1, x2, x3, x4, x5, x6) = U12_GAAA(x5, x6) We have to consider all (P,R,Pi)-chains ---------------------------------------- (37) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (38) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAA(N, X1, =_out_ag(X3)) -> U8_GAAA(N, isGreater_in_gg(X1, X3)) U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_in_ag(U)) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_in_ag(N)) U6_GAAA(N, =_out_ag(X1)) -> U7_GAAA(N, X1, =_in_ag(succ(zero))) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) write_in_a -> write_out_a U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) nl_in_ -> nl_out_ U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) U21_gga(x0) U23_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (39) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_in_ag(U)) at position [0] we obtained the following new rules [LPAR04]: (U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)),U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U))) ---------------------------------------- (40) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAA(N, X1, =_out_ag(X3)) -> U8_GAAA(N, isGreater_in_gg(X1, X3)) U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_in_ag(N)) U6_GAAA(N, =_out_ag(X1)) -> U7_GAAA(N, X1, =_in_ag(succ(zero))) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) write_in_a -> write_out_a U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) nl_in_ -> nl_out_ U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) U21_gga(x0) U23_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (41) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule MOVE_IN_GAAA(N) -> U6_GAAA(N, =_in_ag(N)) at position [1] we obtained the following new rules [LPAR04]: (MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)),MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N))) ---------------------------------------- (42) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAA(N, X1, =_out_ag(X3)) -> U8_GAAA(N, isGreater_in_gg(X1, X3)) U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U6_GAAA(N, =_out_ag(X1)) -> U7_GAAA(N, X1, =_in_ag(succ(zero))) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) write_in_a -> write_out_a U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) nl_in_ -> nl_out_ U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) U21_gga(x0) U23_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (43) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U6_GAAA(N, =_out_ag(X1)) -> U7_GAAA(N, X1, =_in_ag(succ(zero))) at position [2] we obtained the following new rules [LPAR04]: (U6_GAAA(N, =_out_ag(X1)) -> U7_GAAA(N, X1, =_out_ag(succ(zero))),U6_GAAA(N, =_out_ag(X1)) -> U7_GAAA(N, X1, =_out_ag(succ(zero)))) ---------------------------------------- (44) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAA(N, X1, =_out_ag(X3)) -> U8_GAAA(N, isGreater_in_gg(X1, X3)) U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(N, =_out_ag(X1)) -> U7_GAAA(N, X1, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) write_in_a -> write_out_a U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) nl_in_ -> nl_out_ U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) U21_gga(x0) U23_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (45) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GAAA(N, X1, =_out_ag(X3)) -> U8_GAAA(N, isGreater_in_gg(X1, X3)) we obtained the following new rules [LPAR04]: (U7_GAAA(z0, z1, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z1, succ(zero))),U7_GAAA(z0, z1, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z1, succ(zero)))) ---------------------------------------- (46) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(N, =_out_ag(X1)) -> U7_GAAA(N, X1, =_out_ag(succ(zero))) U7_GAAA(z0, z1, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z1, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) write_in_a -> write_out_a U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) nl_in_ -> nl_out_ U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) U21_gga(x0) U23_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (47) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U6_GAAA(N, =_out_ag(X1)) -> U7_GAAA(N, X1, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))),U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero)))) ---------------------------------------- (48) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U7_GAAA(z0, z1, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z1, succ(zero))) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) write_in_a -> write_out_a U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) nl_in_ -> nl_out_ U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) U21_gga(x0) U23_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (49) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GAAA(z0, z1, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z1, succ(zero))) we obtained the following new rules [LPAR04]: (U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))),U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero)))) ---------------------------------------- (50) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) write_in_a -> write_out_a U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) nl_in_ -> nl_out_ U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) U21_gga(x0) U23_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (51) QDPQMonotonicMRRProof (EQUIVALENT) By using the Q-monotonic rule removal processor with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented such that it always occurs at a strongly monotonic position in a (P,Q,R)-chain. Strictly oriented rules of the TRS R: isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) Used ordering: Polynomial interpretation [POLO]: POL(' to ') = 0 POL('Move top disk from ') = 0 POL(=_in_ag(x_1)) = 0 POL(=_out_ag(x_1)) = 0 POL(MOVE_IN_GAAA(x_1)) = 0 POL(U10_GAAA(x_1)) = 0 POL(U10_gaaa(x_1)) = 0 POL(U11_GAAA(x_1, x_2)) = 2*x_2 POL(U11_gaaa(x_1, x_2)) = 2*x_2 POL(U12_GAAA(x_1, x_2)) = 2*x_2 POL(U12_gaaa(x_1, x_2)) = 2*x_2 POL(U13_gaaa(x_1)) = x_1 POL(U18_gga(x_1)) = 2*x_1 POL(U19_gga(x_1)) = 1 + x_1 POL(U1_gaaa(x_1)) = 0 POL(U20_gga(x_1)) = 2*x_1 POL(U21_gga(x_1)) = x_1 POL(U22_gga(x_1)) = 2*x_1 POL(U23_gga(x_1)) = 1 + x_1 POL(U2_gaaa(x_1)) = 0 POL(U3_gaaa(x_1)) = 0 POL(U47_gg(x_1)) = 0 POL(U48_gg(x_1)) = 0 POL(U4_gaaa(x_1)) = 0 POL(U5_gaaa(x_1)) = 0 POL(U6_GAAA(x_1, x_2)) = 0 POL(U6_gaaa(x_1, x_2)) = 0 POL(U7_GAAA(x_1, x_2, x_3)) = 0 POL(U7_gaaa(x_1, x_2, x_3)) = 0 POL(U8_GAAA(x_1, x_2)) = 0 POL(U8_gaaa(x_1, x_2)) = 0 POL(U9_GAAA(x_1)) = x_1 POL(U9_gaaa(x_1)) = 2*x_1 POL(isGreater_in_gg(x_1, x_2)) = 0 POL(isGreater_out_gg) = 0 POL(isMinus_in_gga(x_1, x_2)) = x_2 POL(isMinus_out_gga(x_1)) = 0 POL(move_in_gaaa(x_1)) = 0 POL(move_out_gaaa) = 0 POL(nl_in_) = 0 POL(nl_out_) = 0 POL(pred(x_1)) = 1 + x_1 POL(succ(x_1)) = 2*x_1 POL(write_in_a) = 0 POL(write_in_g(x_1)) = 0 POL(write_out_a) = 0 POL(write_out_g) = 0 POL(zero) = 0 ---------------------------------------- (52) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) write_in_a -> write_out_a U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) nl_in_ -> nl_out_ U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) U21_gga(x0) U23_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (53) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (54) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) U21_gga(x0) U23_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (55) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. U21_gga(x0) ---------------------------------------- (56) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) U23_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (57) QDPQMonotonicMRRProof (EQUIVALENT) By using the Q-monotonic rule removal processor with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented such that it always occurs at a strongly monotonic position in a (P,Q,R)-chain. Strictly oriented rules of the TRS R: isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) Used ordering: Polynomial interpretation [POLO]: POL(' to ') = 0 POL('Move top disk from ') = 0 POL(=_in_ag(x_1)) = 2*x_1 POL(=_out_ag(x_1)) = x_1 POL(MOVE_IN_GAAA(x_1)) = 0 POL(U10_GAAA(x_1)) = 0 POL(U10_gaaa(x_1)) = 0 POL(U11_GAAA(x_1, x_2)) = 2*x_2 POL(U11_gaaa(x_1, x_2)) = 2*x_2 POL(U12_GAAA(x_1, x_2)) = 2*x_2 POL(U12_gaaa(x_1, x_2)) = 2*x_2 POL(U13_gaaa(x_1)) = 2*x_1 POL(U18_gga(x_1)) = 0 POL(U19_gga(x_1)) = 0 POL(U1_gaaa(x_1)) = 0 POL(U20_gga(x_1)) = 0 POL(U22_gga(x_1)) = 0 POL(U23_gga(x_1)) = 0 POL(U2_gaaa(x_1)) = 0 POL(U3_gaaa(x_1)) = 0 POL(U47_gg(x_1)) = 2*x_1 POL(U48_gg(x_1)) = x_1 POL(U4_gaaa(x_1)) = 0 POL(U5_gaaa(x_1)) = 0 POL(U6_GAAA(x_1, x_2)) = 0 POL(U6_gaaa(x_1, x_2)) = 0 POL(U7_GAAA(x_1, x_2, x_3)) = 0 POL(U7_gaaa(x_1, x_2, x_3)) = 2*x_3 POL(U8_GAAA(x_1, x_2)) = 2*x_2 POL(U8_gaaa(x_1, x_2)) = x_2 POL(U9_GAAA(x_1)) = 0 POL(U9_gaaa(x_1)) = 0 POL(isGreater_in_gg(x_1, x_2)) = x_2 POL(isGreater_out_gg) = 0 POL(isMinus_in_gga(x_1, x_2)) = 0 POL(isMinus_out_gga(x_1)) = 0 POL(move_in_gaaa(x_1)) = 0 POL(move_out_gaaa) = 0 POL(nl_in_) = 0 POL(nl_out_) = 0 POL(pred(x_1)) = 1 + x_1 POL(succ(x_1)) = 2*x_1 POL(write_in_a) = 0 POL(write_in_g(x_1)) = 0 POL(write_out_a) = 0 POL(write_out_g) = 0 POL(zero) = 0 ---------------------------------------- (58) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) U23_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (59) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (60) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) U23_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (61) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. U48_gg(x0) ---------------------------------------- (62) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) U23_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (63) QDPQMonotonicMRRProof (EQUIVALENT) By using the Q-monotonic rule removal processor with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented such that it always occurs at a strongly monotonic position in a (P,Q,R)-chain. Strictly oriented rules of the TRS R: isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) Used ordering: Polynomial interpretation [POLO]: POL(' to ') = 0 POL('Move top disk from ') = 0 POL(=_in_ag(x_1)) = 0 POL(=_out_ag(x_1)) = 0 POL(MOVE_IN_GAAA(x_1)) = 0 POL(U10_GAAA(x_1)) = 0 POL(U10_gaaa(x_1)) = 0 POL(U11_GAAA(x_1, x_2)) = 2*x_2 POL(U11_gaaa(x_1, x_2)) = x_2 POL(U12_GAAA(x_1, x_2)) = 2*x_2 POL(U12_gaaa(x_1, x_2)) = 2*x_2 POL(U13_gaaa(x_1)) = 2*x_1 POL(U18_gga(x_1)) = x_1 POL(U19_gga(x_1)) = 2 + 2*x_1 POL(U1_gaaa(x_1)) = 0 POL(U20_gga(x_1)) = x_1 POL(U22_gga(x_1)) = 2*x_1 POL(U23_gga(x_1)) = 2*x_1 POL(U2_gaaa(x_1)) = 0 POL(U3_gaaa(x_1)) = 0 POL(U47_gg(x_1)) = 0 POL(U4_gaaa(x_1)) = 0 POL(U5_gaaa(x_1)) = 0 POL(U6_GAAA(x_1, x_2)) = 0 POL(U6_gaaa(x_1, x_2)) = 0 POL(U7_GAAA(x_1, x_2, x_3)) = 0 POL(U7_gaaa(x_1, x_2, x_3)) = 0 POL(U8_GAAA(x_1, x_2)) = 0 POL(U8_gaaa(x_1, x_2)) = 0 POL(U9_GAAA(x_1)) = 2*x_1 POL(U9_gaaa(x_1)) = 2*x_1 POL(isGreater_in_gg(x_1, x_2)) = 0 POL(isGreater_out_gg) = 0 POL(isMinus_in_gga(x_1, x_2)) = x_2 POL(isMinus_out_gga(x_1)) = 0 POL(move_in_gaaa(x_1)) = 0 POL(move_out_gaaa) = 0 POL(nl_in_) = 2 POL(nl_out_) = 0 POL(pred(x_1)) = 2 + 2*x_1 POL(succ(x_1)) = 2*x_1 POL(write_in_a) = 0 POL(write_in_g(x_1)) = 0 POL(write_out_a) = 0 POL(write_out_g) = 0 POL(zero) = 0 ---------------------------------------- (64) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) U23_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (65) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. U23_gga(x0) ---------------------------------------- (66) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (67) QDPQMonotonicMRRProof (EQUIVALENT) By using the Q-monotonic rule removal processor with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented such that it always occurs at a strongly monotonic position in a (P,Q,R)-chain. Strictly oriented rules of the TRS R: isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) Used ordering: Polynomial interpretation [POLO]: POL(' to ') = 0 POL('Move top disk from ') = 0 POL(=_in_ag(x_1)) = 0 POL(=_out_ag(x_1)) = 0 POL(MOVE_IN_GAAA(x_1)) = 0 POL(U10_GAAA(x_1)) = 0 POL(U10_gaaa(x_1)) = 0 POL(U11_GAAA(x_1, x_2)) = 2*x_2 POL(U11_gaaa(x_1, x_2)) = x_2 POL(U12_GAAA(x_1, x_2)) = 2*x_2 POL(U12_gaaa(x_1, x_2)) = x_2 POL(U13_gaaa(x_1)) = 2*x_1 POL(U18_gga(x_1)) = 2*x_1 POL(U19_gga(x_1)) = x_1 POL(U1_gaaa(x_1)) = 0 POL(U20_gga(x_1)) = 2*x_1 POL(U22_gga(x_1)) = x_1 POL(U2_gaaa(x_1)) = 0 POL(U3_gaaa(x_1)) = 0 POL(U47_gg(x_1)) = 0 POL(U4_gaaa(x_1)) = 0 POL(U5_gaaa(x_1)) = 0 POL(U6_GAAA(x_1, x_2)) = 0 POL(U6_gaaa(x_1, x_2)) = 0 POL(U7_GAAA(x_1, x_2, x_3)) = 0 POL(U7_gaaa(x_1, x_2, x_3)) = 0 POL(U8_GAAA(x_1, x_2)) = 0 POL(U8_gaaa(x_1, x_2)) = 0 POL(U9_GAAA(x_1)) = 2*x_1 POL(U9_gaaa(x_1)) = 2*x_1 POL(isGreater_in_gg(x_1, x_2)) = 0 POL(isGreater_out_gg) = 0 POL(isMinus_in_gga(x_1, x_2)) = 2*x_2 POL(isMinus_out_gga(x_1)) = 0 POL(move_in_gaaa(x_1)) = 0 POL(move_out_gaaa) = 0 POL(nl_in_) = 0 POL(nl_out_) = 0 POL(pred(x_1)) = 1 + 2*x_1 POL(succ(x_1)) = 2*x_1 POL(write_in_a) = 0 POL(write_in_g(x_1)) = 0 POL(write_out_a) = 0 POL(write_out_g) = 0 POL(zero) = 0 ---------------------------------------- (68) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U19_gga(x0) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (69) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. U19_gga(x0) ---------------------------------------- (70) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (71) TransformationProof (SOUND) By narrowing [LPAR04] the rule U8_GAAA(N, isGreater_out_gg) -> U9_GAAA(isMinus_in_gga(N, succ(zero))) at position [0] we obtained the following new rules [LPAR04]: (U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(U18_gga(isMinus_in_gga(zero, zero))),U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(U18_gga(isMinus_in_gga(zero, zero)))) (U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(U20_gga(isMinus_in_gga(x0, zero))),U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(U20_gga(isMinus_in_gga(x0, zero)))) (U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(U22_gga(isMinus_in_gga(x0, zero))),U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(U22_gga(isMinus_in_gga(x0, zero)))) ---------------------------------------- (72) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(U18_gga(isMinus_in_gga(zero, zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(U20_gga(isMinus_in_gga(x0, zero))) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(U22_gga(isMinus_in_gga(x0, zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (73) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(U18_gga(isMinus_in_gga(zero, zero))) at position [0,0] we obtained the following new rules [LPAR04]: (U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(U18_gga(isMinus_out_gga(zero))),U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(U18_gga(isMinus_out_gga(zero)))) ---------------------------------------- (74) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(U20_gga(isMinus_in_gga(x0, zero))) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(U22_gga(isMinus_in_gga(x0, zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(U18_gga(isMinus_out_gga(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (75) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(U20_gga(isMinus_in_gga(x0, zero))) at position [0,0] we obtained the following new rules [LPAR04]: (U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(U20_gga(isMinus_out_gga(x0))),U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(U20_gga(isMinus_out_gga(x0)))) ---------------------------------------- (76) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(U22_gga(isMinus_in_gga(x0, zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(U18_gga(isMinus_out_gga(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(U20_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (77) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(U22_gga(isMinus_in_gga(x0, zero))) at position [0,0] we obtained the following new rules [LPAR04]: (U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(U22_gga(isMinus_out_gga(x0))),U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(U22_gga(isMinus_out_gga(x0)))) ---------------------------------------- (78) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(U18_gga(isMinus_out_gga(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(U20_gga(isMinus_out_gga(x0))) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(U22_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (79) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(U18_gga(isMinus_out_gga(zero))) at position [0] we obtained the following new rules [LPAR04]: (U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))),U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero)))) ---------------------------------------- (80) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(U20_gga(isMinus_out_gga(x0))) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(U22_gga(isMinus_out_gga(x0))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (81) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(U20_gga(isMinus_out_gga(x0))) at position [0] we obtained the following new rules [LPAR04]: (U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)),U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0))) ---------------------------------------- (82) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(U22_gga(isMinus_out_gga(x0))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (83) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(U22_gga(isMinus_out_gga(x0))) at position [0] we obtained the following new rules [LPAR04]: (U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))),U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0))))) ---------------------------------------- (84) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (85) TransformationProof (SOUND) By narrowing [LPAR04] the rule U10_GAAA(=_out_ag(M)) -> U11_GAAA(M, move_in_gaaa(M)) at position [1] we obtained the following new rules [LPAR04]: (U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U1_gaaa(write_in_g('Move top disk from '))),U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U1_gaaa(write_in_g('Move top disk from ')))) (U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_in_ag(x0))),U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_in_ag(x0)))) ---------------------------------------- (86) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U1_gaaa(write_in_g('Move top disk from '))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_in_ag(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (87) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U1_gaaa(write_in_g('Move top disk from '))) at position [1,0] we obtained the following new rules [LPAR04]: (U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U1_gaaa(write_out_g)),U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U1_gaaa(write_out_g))) ---------------------------------------- (88) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_in_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U1_gaaa(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (89) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_in_ag(x0))) at position [1,1] we obtained the following new rules [LPAR04]: (U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))),U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0)))) ---------------------------------------- (90) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U1_gaaa(write_out_g)) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (91) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U1_gaaa(write_out_g)) at position [1] we obtained the following new rules [LPAR04]: (U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U2_gaaa(write_in_a)),U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U2_gaaa(write_in_a))) ---------------------------------------- (92) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U2_gaaa(write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (93) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U2_gaaa(write_in_a)) at position [1,0] we obtained the following new rules [LPAR04]: (U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U2_gaaa(write_out_a)),U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U2_gaaa(write_out_a))) ---------------------------------------- (94) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U2_gaaa(write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (95) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U2_gaaa(write_out_a)) at position [1] we obtained the following new rules [LPAR04]: (U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U3_gaaa(write_in_g(' to '))),U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U3_gaaa(write_in_g(' to ')))) ---------------------------------------- (96) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U3_gaaa(write_in_g(' to '))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (97) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U3_gaaa(write_in_g(' to '))) at position [1,0] we obtained the following new rules [LPAR04]: (U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U3_gaaa(write_out_g)),U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U3_gaaa(write_out_g))) ---------------------------------------- (98) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U3_gaaa(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (99) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U3_gaaa(write_out_g)) at position [1] we obtained the following new rules [LPAR04]: (U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U4_gaaa(write_in_a)),U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U4_gaaa(write_in_a))) ---------------------------------------- (100) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U4_gaaa(write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (101) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U4_gaaa(write_in_a)) at position [1,0] we obtained the following new rules [LPAR04]: (U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U4_gaaa(write_out_a)),U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U4_gaaa(write_out_a))) ---------------------------------------- (102) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U4_gaaa(write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (103) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U4_gaaa(write_out_a)) at position [1] we obtained the following new rules [LPAR04]: (U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U5_gaaa(nl_in_)),U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U5_gaaa(nl_in_))) ---------------------------------------- (104) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U5_gaaa(nl_in_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (105) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U5_gaaa(nl_in_)) at position [1,0] we obtained the following new rules [LPAR04]: (U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U5_gaaa(nl_out_)),U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U5_gaaa(nl_out_))) ---------------------------------------- (106) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U5_gaaa(nl_out_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (107) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), U5_gaaa(nl_out_)) at position [1] we obtained the following new rules [LPAR04]: (U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa),U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa)) ---------------------------------------- (108) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (109) TransformationProof (SOUND) By narrowing [LPAR04] the rule U11_GAAA(M, move_out_gaaa) -> U12_GAAA(M, move_in_gaaa(succ(zero))) at position [1] we obtained the following new rules [LPAR04]: (U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U1_gaaa(write_in_g('Move top disk from '))),U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U1_gaaa(write_in_g('Move top disk from ')))) (U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_in_ag(succ(zero)))),U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_in_ag(succ(zero))))) ---------------------------------------- (110) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U1_gaaa(write_in_g('Move top disk from '))) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_in_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (111) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U1_gaaa(write_in_g('Move top disk from '))) at position [1,0] we obtained the following new rules [LPAR04]: (U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U1_gaaa(write_out_g)),U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U1_gaaa(write_out_g))) ---------------------------------------- (112) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_in_ag(succ(zero)))) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U1_gaaa(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (113) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_in_ag(succ(zero)))) at position [1,1] we obtained the following new rules [LPAR04]: (U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))),U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero))))) ---------------------------------------- (114) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U1_gaaa(write_out_g)) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (115) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U1_gaaa(write_out_g)) at position [1] we obtained the following new rules [LPAR04]: (U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U2_gaaa(write_in_a)),U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U2_gaaa(write_in_a))) ---------------------------------------- (116) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U2_gaaa(write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (117) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U2_gaaa(write_in_a)) at position [1,0] we obtained the following new rules [LPAR04]: (U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U2_gaaa(write_out_a)),U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U2_gaaa(write_out_a))) ---------------------------------------- (118) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U2_gaaa(write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (119) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U2_gaaa(write_out_a)) at position [1] we obtained the following new rules [LPAR04]: (U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U3_gaaa(write_in_g(' to '))),U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U3_gaaa(write_in_g(' to ')))) ---------------------------------------- (120) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U3_gaaa(write_in_g(' to '))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (121) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U3_gaaa(write_in_g(' to '))) at position [1,0] we obtained the following new rules [LPAR04]: (U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U3_gaaa(write_out_g)),U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U3_gaaa(write_out_g))) ---------------------------------------- (122) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U3_gaaa(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (123) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U3_gaaa(write_out_g)) at position [1] we obtained the following new rules [LPAR04]: (U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U4_gaaa(write_in_a)),U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U4_gaaa(write_in_a))) ---------------------------------------- (124) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U4_gaaa(write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (125) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U4_gaaa(write_in_a)) at position [1,0] we obtained the following new rules [LPAR04]: (U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U4_gaaa(write_out_a)),U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U4_gaaa(write_out_a))) ---------------------------------------- (126) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U4_gaaa(write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (127) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U4_gaaa(write_out_a)) at position [1] we obtained the following new rules [LPAR04]: (U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U5_gaaa(nl_in_)),U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U5_gaaa(nl_in_))) ---------------------------------------- (128) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U5_gaaa(nl_in_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (129) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U5_gaaa(nl_in_)) at position [1,0] we obtained the following new rules [LPAR04]: (U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U5_gaaa(nl_out_)),U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U5_gaaa(nl_out_))) ---------------------------------------- (130) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U5_gaaa(nl_out_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (131) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U5_gaaa(nl_out_)) at position [1] we obtained the following new rules [LPAR04]: (U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, move_out_gaaa),U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, move_out_gaaa)) ---------------------------------------- (132) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, move_out_gaaa) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (133) TransformationProof (SOUND) By narrowing [LPAR04] the rule U7_GAAA(z0, z0, =_out_ag(succ(zero))) -> U8_GAAA(z0, isGreater_in_gg(z0, succ(zero))) at position [1] we obtained the following new rules [LPAR04]: (U7_GAAA(succ(x0), succ(x0), =_out_ag(succ(zero))) -> U8_GAAA(succ(x0), U47_gg(isGreater_in_gg(x0, zero))),U7_GAAA(succ(x0), succ(x0), =_out_ag(succ(zero))) -> U8_GAAA(succ(x0), U47_gg(isGreater_in_gg(x0, zero)))) ---------------------------------------- (134) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U8_GAAA(zero, isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U8_GAAA(pred(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(pred(pred(x0)))) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, move_out_gaaa) U7_GAAA(succ(x0), succ(x0), =_out_ag(succ(zero))) -> U8_GAAA(succ(x0), U47_gg(isGreater_in_gg(x0, zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (135) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes. ---------------------------------------- (136) Obligation: Q DP problem: The TRS P consists of the following rules: MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) U7_GAAA(succ(x0), succ(x0), =_out_ag(succ(zero))) -> U8_GAAA(succ(x0), U47_gg(isGreater_in_gg(x0, zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, move_out_gaaa) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (137) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U6_GAAA(z0, =_out_ag(z0)) -> U7_GAAA(z0, z0, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) -> U7_GAAA(succ(y_0), succ(y_0), =_out_ag(succ(zero))),U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) -> U7_GAAA(succ(y_0), succ(y_0), =_out_ag(succ(zero)))) ---------------------------------------- (138) Obligation: Q DP problem: The TRS P consists of the following rules: MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) U7_GAAA(succ(x0), succ(x0), =_out_ag(succ(zero))) -> U8_GAAA(succ(x0), U47_gg(isGreater_in_gg(x0, zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, move_out_gaaa) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) -> U7_GAAA(succ(y_0), succ(y_0), =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (139) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule MOVE_IN_GAAA(N) -> U6_GAAA(N, =_out_ag(N)) we obtained the following new rules [LPAR04]: (MOVE_IN_GAAA(succ(y_0)) -> U6_GAAA(succ(y_0), =_out_ag(succ(y_0))),MOVE_IN_GAAA(succ(y_0)) -> U6_GAAA(succ(y_0), =_out_ag(succ(y_0)))) ---------------------------------------- (140) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAA(succ(x0), succ(x0), =_out_ag(succ(zero))) -> U8_GAAA(succ(x0), U47_gg(isGreater_in_gg(x0, zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, move_out_gaaa) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) -> U7_GAAA(succ(y_0), succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAA(succ(y_0)) -> U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (141) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U10_GAAA(=_out_ag(M)) -> MOVE_IN_GAAA(M) we obtained the following new rules [LPAR04]: (U10_GAAA(=_out_ag(succ(y_0))) -> MOVE_IN_GAAA(succ(y_0)),U10_GAAA(=_out_ag(succ(y_0))) -> MOVE_IN_GAAA(succ(y_0))) ---------------------------------------- (142) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAA(succ(x0), succ(x0), =_out_ag(succ(zero))) -> U8_GAAA(succ(x0), U47_gg(isGreater_in_gg(x0, zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, move_out_gaaa) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) -> U7_GAAA(succ(y_0), succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAA(succ(y_0)) -> U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) U10_GAAA(=_out_ag(succ(y_0))) -> MOVE_IN_GAAA(succ(y_0)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (143) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U12_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(M) we obtained the following new rules [LPAR04]: (U12_GAAA(succ(y_0), move_out_gaaa) -> MOVE_IN_GAAA(succ(y_0)),U12_GAAA(succ(y_0), move_out_gaaa) -> MOVE_IN_GAAA(succ(y_0))) ---------------------------------------- (144) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAA(succ(x0), succ(x0), =_out_ag(succ(zero))) -> U8_GAAA(succ(x0), U47_gg(isGreater_in_gg(x0, zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, move_out_gaaa) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) -> U7_GAAA(succ(y_0), succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAA(succ(y_0)) -> U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) U10_GAAA(=_out_ag(succ(y_0))) -> MOVE_IN_GAAA(succ(y_0)) U12_GAAA(succ(y_0), move_out_gaaa) -> MOVE_IN_GAAA(succ(y_0)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (145) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) we obtained the following new rules [LPAR04]: (U11_GAAA(succ(y_0), move_out_gaaa) -> U12_GAAA(succ(y_0), U6_gaaa(succ(zero), =_out_ag(succ(zero)))),U11_GAAA(succ(y_0), move_out_gaaa) -> U12_GAAA(succ(y_0), U6_gaaa(succ(zero), =_out_ag(succ(zero))))) ---------------------------------------- (146) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAA(succ(x0), succ(x0), =_out_ag(succ(zero))) -> U8_GAAA(succ(x0), U47_gg(isGreater_in_gg(x0, zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, move_out_gaaa) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) -> U7_GAAA(succ(y_0), succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAA(succ(y_0)) -> U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) U10_GAAA(=_out_ag(succ(y_0))) -> MOVE_IN_GAAA(succ(y_0)) U12_GAAA(succ(y_0), move_out_gaaa) -> MOVE_IN_GAAA(succ(y_0)) U11_GAAA(succ(y_0), move_out_gaaa) -> U12_GAAA(succ(y_0), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (147) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GAAA(y0, move_out_gaaa) -> U12_GAAA(y0, move_out_gaaa) we obtained the following new rules [LPAR04]: (U11_GAAA(succ(y_0), move_out_gaaa) -> U12_GAAA(succ(y_0), move_out_gaaa),U11_GAAA(succ(y_0), move_out_gaaa) -> U12_GAAA(succ(y_0), move_out_gaaa)) ---------------------------------------- (148) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAA(succ(x0), succ(x0), =_out_ag(succ(zero))) -> U8_GAAA(succ(x0), U47_gg(isGreater_in_gg(x0, zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) -> U7_GAAA(succ(y_0), succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAA(succ(y_0)) -> U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) U10_GAAA(=_out_ag(succ(y_0))) -> MOVE_IN_GAAA(succ(y_0)) U12_GAAA(succ(y_0), move_out_gaaa) -> MOVE_IN_GAAA(succ(y_0)) U11_GAAA(succ(y_0), move_out_gaaa) -> U12_GAAA(succ(y_0), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAA(succ(y_0), move_out_gaaa) -> U12_GAAA(succ(y_0), move_out_gaaa) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (149) QDPQMonotonicMRRProof (EQUIVALENT) By using the Q-monotonic rule removal processor with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented such that it always occurs at a strongly monotonic position in a (P,Q,R)-chain. Strictly oriented dependency pairs: U10_GAAA(=_out_ag(succ(zero))) -> U11_GAAA(succ(zero), move_out_gaaa) U10_GAAA(=_out_ag(succ(y_0))) -> MOVE_IN_GAAA(succ(y_0)) U12_GAAA(succ(y_0), move_out_gaaa) -> MOVE_IN_GAAA(succ(y_0)) U11_GAAA(succ(y_0), move_out_gaaa) -> U12_GAAA(succ(y_0), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAA(succ(y_0), move_out_gaaa) -> U12_GAAA(succ(y_0), move_out_gaaa) Used ordering: Polynomial interpretation [POLO]: POL(' to ') = 0 POL('Move top disk from ') = 0 POL(=_in_ag(x_1)) = x_1 POL(=_out_ag(x_1)) = x_1 POL(MOVE_IN_GAAA(x_1)) = x_1 POL(U10_GAAA(x_1)) = 2 + 2*x_1 POL(U10_gaaa(x_1)) = 0 POL(U11_GAAA(x_1, x_2)) = 2 + x_1 POL(U11_gaaa(x_1, x_2)) = 0 POL(U12_GAAA(x_1, x_2)) = 1 + x_1 POL(U12_gaaa(x_1, x_2)) = 0 POL(U13_gaaa(x_1)) = 0 POL(U18_gga(x_1)) = 2 POL(U1_gaaa(x_1)) = 0 POL(U20_gga(x_1)) = 1 + 2*x_1 POL(U22_gga(x_1)) = 2 POL(U2_gaaa(x_1)) = 0 POL(U3_gaaa(x_1)) = 0 POL(U47_gg(x_1)) = 1 POL(U4_gaaa(x_1)) = 0 POL(U5_gaaa(x_1)) = 0 POL(U6_GAAA(x_1, x_2)) = x_2 POL(U6_gaaa(x_1, x_2)) = 0 POL(U7_GAAA(x_1, x_2, x_3)) = x_2 POL(U7_gaaa(x_1, x_2, x_3)) = 0 POL(U8_GAAA(x_1, x_2)) = x_1 POL(U8_gaaa(x_1, x_2)) = 0 POL(U9_GAAA(x_1)) = 2 + x_1 POL(U9_gaaa(x_1)) = 0 POL(isGreater_in_gg(x_1, x_2)) = 2 POL(isGreater_out_gg) = 0 POL(isMinus_in_gga(x_1, x_2)) = 2 + 2*x_1 POL(isMinus_out_gga(x_1)) = 2*x_1 POL(move_in_gaaa(x_1)) = 1 POL(move_out_gaaa) = 0 POL(nl_in_) = 0 POL(nl_out_) = 0 POL(pred(x_1)) = 1 POL(succ(x_1)) = 2 + 2*x_1 POL(write_in_a) = 0 POL(write_in_g(x_1)) = 0 POL(write_out_a) = 0 POL(write_out_g) = 0 POL(zero) = 0 ---------------------------------------- (150) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAA(succ(x0), succ(x0), =_out_ag(succ(zero))) -> U8_GAAA(succ(x0), U47_gg(isGreater_in_gg(x0, zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) -> U7_GAAA(succ(y_0), succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAA(succ(y_0)) -> U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (151) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule MOVE_IN_GAAA(succ(y_0)) -> U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) we obtained the following new rules [LPAR04]: (MOVE_IN_GAAA(succ(zero)) -> U6_GAAA(succ(zero), =_out_ag(succ(zero))),MOVE_IN_GAAA(succ(zero)) -> U6_GAAA(succ(zero), =_out_ag(succ(zero)))) ---------------------------------------- (152) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAA(succ(x0), succ(x0), =_out_ag(succ(zero))) -> U8_GAAA(succ(x0), U47_gg(isGreater_in_gg(x0, zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) -> U7_GAAA(succ(y_0), succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAA(succ(zero)) -> U6_GAAA(succ(zero), =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (153) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U6_GAAA(succ(y_0), =_out_ag(succ(y_0))) -> U7_GAAA(succ(y_0), succ(y_0), =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GAAA(succ(zero), =_out_ag(succ(zero))) -> U7_GAAA(succ(zero), succ(zero), =_out_ag(succ(zero))),U6_GAAA(succ(zero), =_out_ag(succ(zero))) -> U7_GAAA(succ(zero), succ(zero), =_out_ag(succ(zero)))) ---------------------------------------- (154) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAA(succ(x0), succ(x0), =_out_ag(succ(zero))) -> U8_GAAA(succ(x0), U47_gg(isGreater_in_gg(x0, zero))) U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) MOVE_IN_GAAA(succ(zero)) -> U6_GAAA(succ(zero), =_out_ag(succ(zero))) U6_GAAA(succ(zero), =_out_ag(succ(zero))) -> U7_GAAA(succ(zero), succ(zero), =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (155) TransformationProof (SOUND) By narrowing [LPAR04] the rule U7_GAAA(succ(x0), succ(x0), =_out_ag(succ(zero))) -> U8_GAAA(succ(x0), U47_gg(isGreater_in_gg(x0, zero))) at position [1,0] we obtained the following new rules [LPAR04]: (U7_GAAA(succ(succ(x0)), succ(succ(x0)), =_out_ag(succ(zero))) -> U8_GAAA(succ(succ(x0)), U47_gg(isGreater_out_gg)),U7_GAAA(succ(succ(x0)), succ(succ(x0)), =_out_ag(succ(zero))) -> U8_GAAA(succ(succ(x0)), U47_gg(isGreater_out_gg))) ---------------------------------------- (156) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAAA(succ(x0), isGreater_out_gg) -> U9_GAAA(isMinus_out_gga(x0)) U9_GAAA(isMinus_out_gga(U)) -> U10_GAAA(=_out_ag(U)) U10_GAAA(=_out_ag(x0)) -> U11_GAAA(x0, U6_gaaa(x0, =_out_ag(x0))) U11_GAAA(M, move_out_gaaa) -> MOVE_IN_GAAA(succ(zero)) MOVE_IN_GAAA(succ(zero)) -> U6_GAAA(succ(zero), =_out_ag(succ(zero))) U6_GAAA(succ(zero), =_out_ag(succ(zero))) -> U7_GAAA(succ(zero), succ(zero), =_out_ag(succ(zero))) U7_GAAA(succ(succ(x0)), succ(succ(x0)), =_out_ag(succ(zero))) -> U8_GAAA(succ(succ(x0)), U47_gg(isGreater_out_gg)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa isMinus_in_gga(X, zero) -> isMinus_out_gga(X) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) write_in_g(X0) -> write_out_g U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) write_in_a -> write_out_a U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) nl_in_ -> nl_out_ U5_gaaa(nl_out_) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_gaaa(x0) U47_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_gaaa(x0) U6_gaaa(x0, x1) write_in_g(x0) U2_gaaa(x0) U7_gaaa(x0, x1, x2) write_in_a U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) nl_in_ U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (157) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 7 less nodes. ---------------------------------------- (158) TRUE ---------------------------------------- (159) Obligation: Pi DP problem: The TRS P consists of the following rules: U7_GGAA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGAA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GGAA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGAA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GGAA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGAA(N, X, Y, Z, =_in_ag(M, U)) U10_GGAA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGAA(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U11_GGAA(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_GGAA(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_GGAA(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> MOVE_IN_GAAG(M, Z, Y, X) MOVE_IN_GAAG(N, X, Y, Z) -> U6_GAAG(N, X, Y, Z, =_in_ag(X1, N)) U6_GAAG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAAG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_GAAG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAAG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GAAG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAAG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GAAG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAAG(N, X, Y, Z, =_in_ag(M, U)) U10_GAAG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAAG(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) U11_GAAG(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_GAAG(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_GAAG(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> MOVE_IN_GGAA(M, Z, Y, X) MOVE_IN_GGAA(N, X, Y, Z) -> U6_GGAA(N, X, Y, Z, =_in_ag(X1, N)) U6_GGAA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGAA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U10_GAAG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAGA(M, X, Z, Y) MOVE_IN_GAGA(N, X, Y, Z) -> U6_GAGA(N, X, Y, Z, =_in_ag(X1, N)) U6_GAGA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAGA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_GAGA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAGA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GAGA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAGA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GAGA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAGA(N, X, Y, Z, =_in_ag(M, U)) U10_GAGA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAGA(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U11_GAGA(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_GAGA(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_GAGA(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> MOVE_IN_GAGA(M, Z, Y, X) U11_GAGA(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> MOVE_IN_GAGA(succ(zero), X, Y, X2) U10_GAGA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAAG(M, X, Z, Y) U11_GGAA(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> MOVE_IN_GGAA(succ(zero), X, Y, X2) U10_GGAA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGAA(M, X, Z, Y) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, X1, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g(X0) U1_gggg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gggg(X, Y, X1, write_in_g(X)) U2_gggg(X, Y, X1, write_out_g(X)) -> U3_gggg(X, Y, X1, write_in_g(' to ')) U3_gggg(X, Y, X1, write_out_g(' to ')) -> U4_gggg(X, Y, X1, write_in_g(Y)) U4_gggg(X, Y, X1, write_out_g(Y)) -> U5_gggg(X, Y, X1, nl_in_) nl_in_ -> nl_out_ U5_gggg(X, Y, X1, nl_out_) -> move_out_gggg(succ(zero), X, Y, X1) move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(X1, N)) =_in_ag(X, X) -> =_out_ag(X, X) U6_gggg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gggg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg(succ(X), zero) isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg(succ(X), pred(Y)) isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(X, Y, isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg(zero, pred(Y)) isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(X, Y, isGreater_in_gg(X, Y)) U48_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U47_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U8_gggg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gggg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) isMinus_in_gga(X, zero, X) -> isMinus_out_gga(X, zero, X) isMinus_in_gga(zero, succ(Y), pred(Z)) -> U18_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(zero, pred(Y), succ(Z)) -> U19_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), succ(Y), Z) -> U20_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(succ(X), pred(Y), succ(succ(Z))) -> U21_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), succ(Y), pred(pred(Z))) -> U22_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), pred(Y), Z) -> U23_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) U23_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), pred(Y), Z) U22_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), succ(Y), pred(pred(Z))) U21_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), pred(Y), succ(succ(Z))) U20_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), succ(Y), Z) U19_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, pred(Y), succ(Z)) U18_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, succ(Y), pred(Z)) U9_gggg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gggg(N, X, Y, Z, =_in_ag(M, U)) U10_gggg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gggg(N, X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> U12_gggg(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) move_in_ggga(succ(zero), X, Y, X1) -> U1_ggga(X, Y, X1, write_in_g('Move top disk from ')) U1_ggga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggga(X, Y, X1, write_in_g(X)) U2_ggga(X, Y, X1, write_out_g(X)) -> U3_ggga(X, Y, X1, write_in_g(' to ')) U3_ggga(X, Y, X1, write_out_g(' to ')) -> U4_ggga(X, Y, X1, write_in_g(Y)) U4_ggga(X, Y, X1, write_out_g(Y)) -> U5_ggga(X, Y, X1, nl_in_) U5_ggga(X, Y, X1, nl_out_) -> move_out_ggga(succ(zero), X, Y, X1) move_in_ggga(N, X, Y, Z) -> U6_ggga(N, X, Y, Z, =_in_ag(X1, N)) U6_ggga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggga(N, X, Y, Z, =_in_ag(M, U)) U10_ggga(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggga(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) move_in_ggag(succ(zero), X, Y, X1) -> U1_ggag(X, Y, X1, write_in_g('Move top disk from ')) U1_ggag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggag(X, Y, X1, write_in_g(X)) U2_ggag(X, Y, X1, write_out_g(X)) -> U3_ggag(X, Y, X1, write_in_g(' to ')) U3_ggag(X, Y, X1, write_out_g(' to ')) -> U4_ggag(X, Y, X1, write_in_a(Y)) write_in_a(X0) -> write_out_a(X0) U4_ggag(X, Y, X1, write_out_a(Y)) -> U5_ggag(X, Y, X1, nl_in_) U5_ggag(X, Y, X1, nl_out_) -> move_out_ggag(succ(zero), X, Y, X1) move_in_ggag(N, X, Y, Z) -> U6_ggag(N, X, Y, Z, =_in_ag(X1, N)) U6_ggag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggag(N, X, Y, Z, =_in_ag(M, U)) U10_ggag(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggag(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U11_ggag(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_ggag(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) move_in_ggaa(succ(zero), X, Y, X1) -> U1_ggaa(X, Y, X1, write_in_g('Move top disk from ')) U1_ggaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggaa(X, Y, X1, write_in_g(X)) U2_ggaa(X, Y, X1, write_out_g(X)) -> U3_ggaa(X, Y, X1, write_in_g(' to ')) U3_ggaa(X, Y, X1, write_out_g(' to ')) -> U4_ggaa(X, Y, X1, write_in_a(Y)) U4_ggaa(X, Y, X1, write_out_a(Y)) -> U5_ggaa(X, Y, X1, nl_in_) U5_ggaa(X, Y, X1, nl_out_) -> move_out_ggaa(succ(zero), X, Y, X1) move_in_ggaa(N, X, Y, Z) -> U6_ggaa(N, X, Y, Z, =_in_ag(X1, N)) U6_ggaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggaa(N, X, Y, Z, =_in_ag(M, U)) U10_ggaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggaa(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U11_ggaa(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_ggaa(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_ggaa(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggaa(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) move_in_gaag(succ(zero), X, Y, X1) -> U1_gaag(X, Y, X1, write_in_g('Move top disk from ')) U1_gaag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaag(X, Y, X1, write_in_a(X)) U2_gaag(X, Y, X1, write_out_a(X)) -> U3_gaag(X, Y, X1, write_in_g(' to ')) U3_gaag(X, Y, X1, write_out_g(' to ')) -> U4_gaag(X, Y, X1, write_in_a(Y)) U4_gaag(X, Y, X1, write_out_a(Y)) -> U5_gaag(X, Y, X1, nl_in_) U5_gaag(X, Y, X1, nl_out_) -> move_out_gaag(succ(zero), X, Y, X1) move_in_gaag(N, X, Y, Z) -> U6_gaag(N, X, Y, Z, =_in_ag(X1, N)) U6_gaag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaag(N, X, Y, Z, =_in_ag(M, U)) U10_gaag(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaag(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) move_in_gaga(succ(zero), X, Y, X1) -> U1_gaga(X, Y, X1, write_in_g('Move top disk from ')) U1_gaga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaga(X, Y, X1, write_in_a(X)) U2_gaga(X, Y, X1, write_out_a(X)) -> U3_gaga(X, Y, X1, write_in_g(' to ')) U3_gaga(X, Y, X1, write_out_g(' to ')) -> U4_gaga(X, Y, X1, write_in_g(Y)) U4_gaga(X, Y, X1, write_out_g(Y)) -> U5_gaga(X, Y, X1, nl_in_) U5_gaga(X, Y, X1, nl_out_) -> move_out_gaga(succ(zero), X, Y, X1) move_in_gaga(N, X, Y, Z) -> U6_gaga(N, X, Y, Z, =_in_ag(X1, N)) U6_gaga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaga(N, X, Y, Z, =_in_ag(M, U)) U10_gaga(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaga(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U11_gaga(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_gaga(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gaga(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gaga(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U13_gaga(N, X, Y, Z, move_out_gaga(M, Z, Y, X)) -> move_out_gaga(N, X, Y, Z) U11_gaag(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_gaag(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) move_in_gaaa(succ(zero), X, Y, X1) -> U1_gaaa(X, Y, X1, write_in_g('Move top disk from ')) U1_gaaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaaa(X, Y, X1, write_in_a(X)) U2_gaaa(X, Y, X1, write_out_a(X)) -> U3_gaaa(X, Y, X1, write_in_g(' to ')) U3_gaaa(X, Y, X1, write_out_g(' to ')) -> U4_gaaa(X, Y, X1, write_in_a(Y)) U4_gaaa(X, Y, X1, write_out_a(Y)) -> U5_gaaa(X, Y, X1, nl_in_) U5_gaaa(X, Y, X1, nl_out_) -> move_out_gaaa(succ(zero), X, Y, X1) move_in_gaaa(N, X, Y, Z) -> U6_gaaa(N, X, Y, Z, =_in_ag(X1, N)) U6_gaaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaaa(N, X, Y, Z, =_in_ag(M, U)) U10_gaaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaaa(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U11_gaaa(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_gaaa(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_gaaa(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaaa(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U13_gaaa(N, X, Y, Z, move_out_gaaa(M, Z, Y, X)) -> move_out_gaaa(N, X, Y, Z) U12_gaag(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaag(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) U13_gaag(N, X, Y, Z, move_out_ggaa(M, Z, Y, X)) -> move_out_gaag(N, X, Y, Z) U13_ggaa(N, X, Y, Z, move_out_gaag(M, Z, Y, X)) -> move_out_ggaa(N, X, Y, Z) U12_ggag(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggag(N, X, Y, Z, move_in_ggag(M, Z, Y, X)) U13_ggag(N, X, Y, Z, move_out_ggag(M, Z, Y, X)) -> move_out_ggag(N, X, Y, Z) U11_ggga(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_ggga(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U12_ggga(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_ggga(N, X, Y, Z, move_in_gagg(M, Z, Y, X)) move_in_gagg(succ(zero), X, Y, X1) -> U1_gagg(X, Y, X1, write_in_g('Move top disk from ')) U1_gagg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gagg(X, Y, X1, write_in_a(X)) U2_gagg(X, Y, X1, write_out_a(X)) -> U3_gagg(X, Y, X1, write_in_g(' to ')) U3_gagg(X, Y, X1, write_out_g(' to ')) -> U4_gagg(X, Y, X1, write_in_g(Y)) U4_gagg(X, Y, X1, write_out_g(Y)) -> U5_gagg(X, Y, X1, nl_in_) U5_gagg(X, Y, X1, nl_out_) -> move_out_gagg(succ(zero), X, Y, X1) move_in_gagg(N, X, Y, Z) -> U6_gagg(N, X, Y, Z, =_in_ag(X1, N)) U6_gagg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gagg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gagg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gagg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gagg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gagg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gagg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gagg(N, X, Y, Z, =_in_ag(M, U)) U10_gagg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gagg(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U11_gagg(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_gagg(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gagg(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gagg(N, X, Y, Z, move_in_ggga(M, Z, Y, X)) U13_gagg(N, X, Y, Z, move_out_ggga(M, Z, Y, X)) -> move_out_gagg(N, X, Y, Z) U13_ggga(N, X, Y, Z, move_out_gagg(M, Z, Y, X)) -> move_out_ggga(N, X, Y, Z) U12_gggg(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_gggg(N, X, Y, Z, move_in_gggg(M, Z, Y, X)) U13_gggg(N, X, Y, Z, move_out_gggg(M, Z, Y, X)) -> move_out_gggg(N, X, Y, Z) The argument filtering Pi contains the following mapping: move_in_gggg(x1, x2, x3, x4) = move_in_gggg(x1, x2, x3, x4) succ(x1) = succ(x1) zero = zero U1_gggg(x1, x2, x3, x4) = U1_gggg(x1, x2, x4) write_in_g(x1) = write_in_g(x1) write_out_g(x1) = write_out_g 'Move top disk from ' = 'Move top disk from ' U2_gggg(x1, x2, x3, x4) = U2_gggg(x2, x4) U3_gggg(x1, x2, x3, x4) = U3_gggg(x2, x4) ' to ' = ' to ' U4_gggg(x1, x2, x3, x4) = U4_gggg(x4) U5_gggg(x1, x2, x3, x4) = U5_gggg(x4) nl_in_ = nl_in_ nl_out_ = nl_out_ move_out_gggg(x1, x2, x3, x4) = move_out_gggg U6_gggg(x1, x2, x3, x4, x5) = U6_gggg(x1, x2, x3, x4, x5) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U7_gggg(x1, x2, x3, x4, x5, x6) = U7_gggg(x1, x2, x3, x4, x5, x6) U8_gggg(x1, x2, x3, x4, x5, x6, x7) = U8_gggg(x1, x2, x3, x4, x7) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U47_gg(x1, x2, x3) = U47_gg(x3) U48_gg(x1, x2, x3) = U48_gg(x3) U9_gggg(x1, x2, x3, x4, x5) = U9_gggg(x2, x3, x4, x5) isMinus_in_gga(x1, x2, x3) = isMinus_in_gga(x1, x2) isMinus_out_gga(x1, x2, x3) = isMinus_out_gga(x3) U18_gga(x1, x2, x3) = U18_gga(x3) U19_gga(x1, x2, x3) = U19_gga(x3) U20_gga(x1, x2, x3, x4) = U20_gga(x4) U21_gga(x1, x2, x3, x4) = U21_gga(x4) U22_gga(x1, x2, x3, x4) = U22_gga(x4) U23_gga(x1, x2, x3, x4) = U23_gga(x4) U10_gggg(x1, x2, x3, x4, x5) = U10_gggg(x2, x3, x4, x5) U11_gggg(x1, x2, x3, x4, x5, x6) = U11_gggg(x2, x3, x4, x5, x6) U12_gggg(x1, x2, x3, x4, x5, x6) = U12_gggg(x2, x3, x4, x5, x6) move_in_ggga(x1, x2, x3, x4) = move_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4) = U1_ggga(x1, x2, x4) U2_ggga(x1, x2, x3, x4) = U2_ggga(x2, x4) U3_ggga(x1, x2, x3, x4) = U3_ggga(x2, x4) U4_ggga(x1, x2, x3, x4) = U4_ggga(x4) U5_ggga(x1, x2, x3, x4) = U5_ggga(x4) move_out_ggga(x1, x2, x3, x4) = move_out_ggga U6_ggga(x1, x2, x3, x4, x5) = U6_ggga(x1, x2, x3, x5) U7_ggga(x1, x2, x3, x4, x5, x6) = U7_ggga(x1, x2, x3, x5, x6) U8_ggga(x1, x2, x3, x4, x5, x6, x7) = U8_ggga(x1, x2, x3, x7) U9_ggga(x1, x2, x3, x4, x5) = U9_ggga(x2, x3, x5) U10_ggga(x1, x2, x3, x4, x5) = U10_ggga(x2, x3, x5) U11_ggga(x1, x2, x3, x4, x5, x6) = U11_ggga(x2, x3, x5, x6) move_in_ggag(x1, x2, x3, x4) = move_in_ggag(x1, x2, x4) U1_ggag(x1, x2, x3, x4) = U1_ggag(x1, x4) U2_ggag(x1, x2, x3, x4) = U2_ggag(x4) U3_ggag(x1, x2, x3, x4) = U3_ggag(x4) U4_ggag(x1, x2, x3, x4) = U4_ggag(x4) write_in_a(x1) = write_in_a write_out_a(x1) = write_out_a U5_ggag(x1, x2, x3, x4) = U5_ggag(x4) move_out_ggag(x1, x2, x3, x4) = move_out_ggag U6_ggag(x1, x2, x3, x4, x5) = U6_ggag(x1, x2, x4, x5) U7_ggag(x1, x2, x3, x4, x5, x6) = U7_ggag(x1, x2, x4, x5, x6) U8_ggag(x1, x2, x3, x4, x5, x6, x7) = U8_ggag(x1, x2, x4, x7) U9_ggag(x1, x2, x3, x4, x5) = U9_ggag(x2, x4, x5) U10_ggag(x1, x2, x3, x4, x5) = U10_ggag(x2, x4, x5) U11_ggag(x1, x2, x3, x4, x5, x6) = U11_ggag(x2, x4, x5, x6) U12_ggag(x1, x2, x3, x4, x5, x6) = U12_ggag(x2, x4, x5, x6) move_in_ggaa(x1, x2, x3, x4) = move_in_ggaa(x1, x2) U1_ggaa(x1, x2, x3, x4) = U1_ggaa(x1, x4) U2_ggaa(x1, x2, x3, x4) = U2_ggaa(x4) U3_ggaa(x1, x2, x3, x4) = U3_ggaa(x4) U4_ggaa(x1, x2, x3, x4) = U4_ggaa(x4) U5_ggaa(x1, x2, x3, x4) = U5_ggaa(x4) move_out_ggaa(x1, x2, x3, x4) = move_out_ggaa U6_ggaa(x1, x2, x3, x4, x5) = U6_ggaa(x1, x2, x5) U7_ggaa(x1, x2, x3, x4, x5, x6) = U7_ggaa(x1, x2, x5, x6) U8_ggaa(x1, x2, x3, x4, x5, x6, x7) = U8_ggaa(x1, x2, x7) U9_ggaa(x1, x2, x3, x4, x5) = U9_ggaa(x2, x5) U10_ggaa(x1, x2, x3, x4, x5) = U10_ggaa(x2, x5) U11_ggaa(x1, x2, x3, x4, x5, x6) = U11_ggaa(x2, x5, x6) U12_ggaa(x1, x2, x3, x4, x5, x6) = U12_ggaa(x2, x5, x6) U13_ggaa(x1, x2, x3, x4, x5) = U13_ggaa(x5) move_in_gaag(x1, x2, x3, x4) = move_in_gaag(x1, x4) U1_gaag(x1, x2, x3, x4) = U1_gaag(x4) U2_gaag(x1, x2, x3, x4) = U2_gaag(x4) U3_gaag(x1, x2, x3, x4) = U3_gaag(x4) U4_gaag(x1, x2, x3, x4) = U4_gaag(x4) U5_gaag(x1, x2, x3, x4) = U5_gaag(x4) move_out_gaag(x1, x2, x3, x4) = move_out_gaag U6_gaag(x1, x2, x3, x4, x5) = U6_gaag(x1, x4, x5) U7_gaag(x1, x2, x3, x4, x5, x6) = U7_gaag(x1, x4, x5, x6) U8_gaag(x1, x2, x3, x4, x5, x6, x7) = U8_gaag(x1, x4, x7) U9_gaag(x1, x2, x3, x4, x5) = U9_gaag(x4, x5) U10_gaag(x1, x2, x3, x4, x5) = U10_gaag(x4, x5) U11_gaag(x1, x2, x3, x4, x5, x6) = U11_gaag(x4, x5, x6) move_in_gaga(x1, x2, x3, x4) = move_in_gaga(x1, x3) U1_gaga(x1, x2, x3, x4) = U1_gaga(x2, x4) U2_gaga(x1, x2, x3, x4) = U2_gaga(x2, x4) U3_gaga(x1, x2, x3, x4) = U3_gaga(x2, x4) U4_gaga(x1, x2, x3, x4) = U4_gaga(x4) U5_gaga(x1, x2, x3, x4) = U5_gaga(x4) move_out_gaga(x1, x2, x3, x4) = move_out_gaga U6_gaga(x1, x2, x3, x4, x5) = U6_gaga(x1, x3, x5) U7_gaga(x1, x2, x3, x4, x5, x6) = U7_gaga(x1, x3, x5, x6) U8_gaga(x1, x2, x3, x4, x5, x6, x7) = U8_gaga(x1, x3, x7) U9_gaga(x1, x2, x3, x4, x5) = U9_gaga(x3, x5) U10_gaga(x1, x2, x3, x4, x5) = U10_gaga(x3, x5) U11_gaga(x1, x2, x3, x4, x5, x6) = U11_gaga(x3, x5, x6) U12_gaga(x1, x2, x3, x4, x5, x6) = U12_gaga(x3, x5, x6) U13_gaga(x1, x2, x3, x4, x5) = U13_gaga(x5) U12_gaag(x1, x2, x3, x4, x5, x6) = U12_gaag(x4, x5, x6) move_in_gaaa(x1, x2, x3, x4) = move_in_gaaa(x1) U1_gaaa(x1, x2, x3, x4) = U1_gaaa(x4) U2_gaaa(x1, x2, x3, x4) = U2_gaaa(x4) U3_gaaa(x1, x2, x3, x4) = U3_gaaa(x4) U4_gaaa(x1, x2, x3, x4) = U4_gaaa(x4) U5_gaaa(x1, x2, x3, x4) = U5_gaaa(x4) move_out_gaaa(x1, x2, x3, x4) = move_out_gaaa U6_gaaa(x1, x2, x3, x4, x5) = U6_gaaa(x1, x5) U7_gaaa(x1, x2, x3, x4, x5, x6) = U7_gaaa(x1, x5, x6) U8_gaaa(x1, x2, x3, x4, x5, x6, x7) = U8_gaaa(x1, x7) U9_gaaa(x1, x2, x3, x4, x5) = U9_gaaa(x5) U10_gaaa(x1, x2, x3, x4, x5) = U10_gaaa(x5) U11_gaaa(x1, x2, x3, x4, x5, x6) = U11_gaaa(x5, x6) U12_gaaa(x1, x2, x3, x4, x5, x6) = U12_gaaa(x5, x6) U13_gaaa(x1, x2, x3, x4, x5) = U13_gaaa(x5) U13_gaag(x1, x2, x3, x4, x5) = U13_gaag(x5) U13_ggag(x1, x2, x3, x4, x5) = U13_ggag(x5) U12_ggga(x1, x2, x3, x4, x5, x6) = U12_ggga(x2, x3, x5, x6) U13_ggga(x1, x2, x3, x4, x5) = U13_ggga(x5) move_in_gagg(x1, x2, x3, x4) = move_in_gagg(x1, x3, x4) U1_gagg(x1, x2, x3, x4) = U1_gagg(x2, x4) U2_gagg(x1, x2, x3, x4) = U2_gagg(x2, x4) U3_gagg(x1, x2, x3, x4) = U3_gagg(x2, x4) U4_gagg(x1, x2, x3, x4) = U4_gagg(x4) U5_gagg(x1, x2, x3, x4) = U5_gagg(x4) move_out_gagg(x1, x2, x3, x4) = move_out_gagg U6_gagg(x1, x2, x3, x4, x5) = U6_gagg(x1, x3, x4, x5) U7_gagg(x1, x2, x3, x4, x5, x6) = U7_gagg(x1, x3, x4, x5, x6) U8_gagg(x1, x2, x3, x4, x5, x6, x7) = U8_gagg(x1, x3, x4, x7) U9_gagg(x1, x2, x3, x4, x5) = U9_gagg(x3, x4, x5) U10_gagg(x1, x2, x3, x4, x5) = U10_gagg(x3, x4, x5) U11_gagg(x1, x2, x3, x4, x5, x6) = U11_gagg(x3, x4, x5, x6) U12_gagg(x1, x2, x3, x4, x5, x6) = U12_gagg(x3, x4, x5, x6) U13_gagg(x1, x2, x3, x4, x5) = U13_gagg(x5) U13_gggg(x1, x2, x3, x4, x5) = U13_gggg(x5) MOVE_IN_GGAA(x1, x2, x3, x4) = MOVE_IN_GGAA(x1, x2) U6_GGAA(x1, x2, x3, x4, x5) = U6_GGAA(x1, x2, x5) U7_GGAA(x1, x2, x3, x4, x5, x6) = U7_GGAA(x1, x2, x5, x6) U8_GGAA(x1, x2, x3, x4, x5, x6, x7) = U8_GGAA(x1, x2, x7) U9_GGAA(x1, x2, x3, x4, x5) = U9_GGAA(x2, x5) U10_GGAA(x1, x2, x3, x4, x5) = U10_GGAA(x2, x5) U11_GGAA(x1, x2, x3, x4, x5, x6) = U11_GGAA(x2, x5, x6) U12_GGAA(x1, x2, x3, x4, x5, x6) = U12_GGAA(x2, x5, x6) MOVE_IN_GAAG(x1, x2, x3, x4) = MOVE_IN_GAAG(x1, x4) U6_GAAG(x1, x2, x3, x4, x5) = U6_GAAG(x1, x4, x5) U7_GAAG(x1, x2, x3, x4, x5, x6) = U7_GAAG(x1, x4, x5, x6) U8_GAAG(x1, x2, x3, x4, x5, x6, x7) = U8_GAAG(x1, x4, x7) U9_GAAG(x1, x2, x3, x4, x5) = U9_GAAG(x4, x5) U10_GAAG(x1, x2, x3, x4, x5) = U10_GAAG(x4, x5) U11_GAAG(x1, x2, x3, x4, x5, x6) = U11_GAAG(x4, x5, x6) MOVE_IN_GAGA(x1, x2, x3, x4) = MOVE_IN_GAGA(x1, x3) U6_GAGA(x1, x2, x3, x4, x5) = U6_GAGA(x1, x3, x5) U7_GAGA(x1, x2, x3, x4, x5, x6) = U7_GAGA(x1, x3, x5, x6) U8_GAGA(x1, x2, x3, x4, x5, x6, x7) = U8_GAGA(x1, x3, x7) U9_GAGA(x1, x2, x3, x4, x5) = U9_GAGA(x3, x5) U10_GAGA(x1, x2, x3, x4, x5) = U10_GAGA(x3, x5) U11_GAGA(x1, x2, x3, x4, x5, x6) = U11_GAGA(x3, x5, x6) U12_GAGA(x1, x2, x3, x4, x5, x6) = U12_GAGA(x3, x5, x6) U12_GAAG(x1, x2, x3, x4, x5, x6) = U12_GAAG(x4, x5, x6) We have to consider all (P,R,Pi)-chains ---------------------------------------- (160) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (161) Obligation: Pi DP problem: The TRS P consists of the following rules: U7_GGAA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGAA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GGAA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGAA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GGAA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGAA(N, X, Y, Z, =_in_ag(M, U)) U10_GGAA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGAA(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U11_GGAA(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_GGAA(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_GGAA(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> MOVE_IN_GAAG(M, Z, Y, X) MOVE_IN_GAAG(N, X, Y, Z) -> U6_GAAG(N, X, Y, Z, =_in_ag(X1, N)) U6_GAAG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAAG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_GAAG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAAG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GAAG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAAG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GAAG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAAG(N, X, Y, Z, =_in_ag(M, U)) U10_GAAG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAAG(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) U11_GAAG(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_GAAG(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_GAAG(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> MOVE_IN_GGAA(M, Z, Y, X) MOVE_IN_GGAA(N, X, Y, Z) -> U6_GGAA(N, X, Y, Z, =_in_ag(X1, N)) U6_GGAA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGAA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U10_GAAG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAGA(M, X, Z, Y) MOVE_IN_GAGA(N, X, Y, Z) -> U6_GAGA(N, X, Y, Z, =_in_ag(X1, N)) U6_GAGA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAGA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_GAGA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAGA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GAGA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAGA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GAGA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAGA(N, X, Y, Z, =_in_ag(M, U)) U10_GAGA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAGA(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U11_GAGA(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_GAGA(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_GAGA(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> MOVE_IN_GAGA(M, Z, Y, X) U11_GAGA(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> MOVE_IN_GAGA(succ(zero), X, Y, X2) U10_GAGA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAAG(M, X, Z, Y) U11_GGAA(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> MOVE_IN_GGAA(succ(zero), X, Y, X2) U10_GGAA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGAA(M, X, Z, Y) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg(succ(X), zero) isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg(succ(X), pred(Y)) isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(X, Y, isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg(zero, pred(Y)) isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(X, Y, isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y), pred(Z)) -> U18_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), succ(Y), Z) -> U20_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), succ(Y), pred(pred(Z))) -> U22_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) =_in_ag(X, X) -> =_out_ag(X, X) move_in_ggaa(succ(zero), X, Y, X1) -> U1_ggaa(X, Y, X1, write_in_g('Move top disk from ')) move_in_ggaa(N, X, Y, Z) -> U6_ggaa(N, X, Y, Z, =_in_ag(X1, N)) move_in_gaga(succ(zero), X, Y, X1) -> U1_gaga(X, Y, X1, write_in_g('Move top disk from ')) move_in_gaga(N, X, Y, Z) -> U6_gaga(N, X, Y, Z, =_in_ag(X1, N)) move_in_gaaa(succ(zero), X, Y, X1) -> U1_gaaa(X, Y, X1, write_in_g('Move top disk from ')) move_in_gaaa(N, X, Y, Z) -> U6_gaaa(N, X, Y, Z, =_in_ag(X1, N)) move_in_gaag(succ(zero), X, Y, X1) -> U1_gaag(X, Y, X1, write_in_g('Move top disk from ')) move_in_gaag(N, X, Y, Z) -> U6_gaag(N, X, Y, Z, =_in_ag(X1, N)) U47_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U48_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U18_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, succ(Y), pred(Z)) U20_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), succ(Y), Z) U22_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), succ(Y), pred(pred(Z))) U1_ggaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggaa(X, Y, X1, write_in_g(X)) U6_ggaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U1_gaga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaga(X, Y, X1, write_in_a(X)) U6_gaga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U1_gaaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaaa(X, Y, X1, write_in_a(X)) U6_gaaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U1_gaag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaag(X, Y, X1, write_in_a(X)) U6_gaag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) isMinus_in_gga(X, zero, X) -> isMinus_out_gga(X, zero, X) isMinus_in_gga(zero, pred(Y), succ(Z)) -> U19_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), pred(Y), succ(succ(Z))) -> U21_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), pred(Y), Z) -> U23_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) write_in_g(X0) -> write_out_g(X0) U2_ggaa(X, Y, X1, write_out_g(X)) -> U3_ggaa(X, Y, X1, write_in_g(' to ')) U7_ggaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U2_gaga(X, Y, X1, write_out_a(X)) -> U3_gaga(X, Y, X1, write_in_g(' to ')) U7_gaga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U2_gaaa(X, Y, X1, write_out_a(X)) -> U3_gaaa(X, Y, X1, write_in_g(' to ')) U7_gaaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U2_gaag(X, Y, X1, write_out_a(X)) -> U3_gaag(X, Y, X1, write_in_g(' to ')) U7_gaag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U19_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, pred(Y), succ(Z)) U21_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), pred(Y), succ(succ(Z))) U23_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), pred(Y), Z) U3_ggaa(X, Y, X1, write_out_g(' to ')) -> U4_ggaa(X, Y, X1, write_in_a(Y)) U8_ggaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) write_in_a(X0) -> write_out_a(X0) U3_gaga(X, Y, X1, write_out_g(' to ')) -> U4_gaga(X, Y, X1, write_in_g(Y)) U8_gaga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U3_gaaa(X, Y, X1, write_out_g(' to ')) -> U4_gaaa(X, Y, X1, write_in_a(Y)) U8_gaaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U3_gaag(X, Y, X1, write_out_g(' to ')) -> U4_gaag(X, Y, X1, write_in_a(Y)) U8_gaag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U4_ggaa(X, Y, X1, write_out_a(Y)) -> U5_ggaa(X, Y, X1, nl_in_) U9_ggaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggaa(N, X, Y, Z, =_in_ag(M, U)) U4_gaga(X, Y, X1, write_out_g(Y)) -> U5_gaga(X, Y, X1, nl_in_) U9_gaga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaga(N, X, Y, Z, =_in_ag(M, U)) U4_gaaa(X, Y, X1, write_out_a(Y)) -> U5_gaaa(X, Y, X1, nl_in_) U9_gaaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaaa(N, X, Y, Z, =_in_ag(M, U)) U4_gaag(X, Y, X1, write_out_a(Y)) -> U5_gaag(X, Y, X1, nl_in_) U9_gaag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaag(N, X, Y, Z, =_in_ag(M, U)) U5_ggaa(X, Y, X1, nl_out_) -> move_out_ggaa(succ(zero), X, Y, X1) U10_ggaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggaa(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U5_gaga(X, Y, X1, nl_out_) -> move_out_gaga(succ(zero), X, Y, X1) U10_gaga(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaga(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U5_gaaa(X, Y, X1, nl_out_) -> move_out_gaaa(succ(zero), X, Y, X1) U10_gaaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaaa(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U5_gaag(X, Y, X1, nl_out_) -> move_out_gaag(succ(zero), X, Y, X1) U10_gaag(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaag(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) nl_in_ -> nl_out_ U11_ggaa(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_ggaa(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U11_gaga(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_gaga(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U11_gaaa(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_gaaa(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U11_gaag(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_gaag(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_ggaa(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggaa(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) U12_gaga(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gaga(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U12_gaaa(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaaa(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U12_gaag(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaag(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) U13_ggaa(N, X, Y, Z, move_out_gaag(M, Z, Y, X)) -> move_out_ggaa(N, X, Y, Z) U13_gaga(N, X, Y, Z, move_out_gaga(M, Z, Y, X)) -> move_out_gaga(N, X, Y, Z) U13_gaaa(N, X, Y, Z, move_out_gaaa(M, Z, Y, X)) -> move_out_gaaa(N, X, Y, Z) U13_gaag(N, X, Y, Z, move_out_ggaa(M, Z, Y, X)) -> move_out_gaag(N, X, Y, Z) The argument filtering Pi contains the following mapping: succ(x1) = succ(x1) zero = zero write_in_g(x1) = write_in_g(x1) write_out_g(x1) = write_out_g 'Move top disk from ' = 'Move top disk from ' ' to ' = ' to ' nl_in_ = nl_in_ nl_out_ = nl_out_ =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U47_gg(x1, x2, x3) = U47_gg(x3) U48_gg(x1, x2, x3) = U48_gg(x3) isMinus_in_gga(x1, x2, x3) = isMinus_in_gga(x1, x2) isMinus_out_gga(x1, x2, x3) = isMinus_out_gga(x3) U18_gga(x1, x2, x3) = U18_gga(x3) U19_gga(x1, x2, x3) = U19_gga(x3) U20_gga(x1, x2, x3, x4) = U20_gga(x4) U21_gga(x1, x2, x3, x4) = U21_gga(x4) U22_gga(x1, x2, x3, x4) = U22_gga(x4) U23_gga(x1, x2, x3, x4) = U23_gga(x4) write_in_a(x1) = write_in_a write_out_a(x1) = write_out_a move_in_ggaa(x1, x2, x3, x4) = move_in_ggaa(x1, x2) U1_ggaa(x1, x2, x3, x4) = U1_ggaa(x1, x4) U2_ggaa(x1, x2, x3, x4) = U2_ggaa(x4) U3_ggaa(x1, x2, x3, x4) = U3_ggaa(x4) U4_ggaa(x1, x2, x3, x4) = U4_ggaa(x4) U5_ggaa(x1, x2, x3, x4) = U5_ggaa(x4) move_out_ggaa(x1, x2, x3, x4) = move_out_ggaa U6_ggaa(x1, x2, x3, x4, x5) = U6_ggaa(x1, x2, x5) U7_ggaa(x1, x2, x3, x4, x5, x6) = U7_ggaa(x1, x2, x5, x6) U8_ggaa(x1, x2, x3, x4, x5, x6, x7) = U8_ggaa(x1, x2, x7) U9_ggaa(x1, x2, x3, x4, x5) = U9_ggaa(x2, x5) U10_ggaa(x1, x2, x3, x4, x5) = U10_ggaa(x2, x5) U11_ggaa(x1, x2, x3, x4, x5, x6) = U11_ggaa(x2, x5, x6) U12_ggaa(x1, x2, x3, x4, x5, x6) = U12_ggaa(x2, x5, x6) U13_ggaa(x1, x2, x3, x4, x5) = U13_ggaa(x5) move_in_gaag(x1, x2, x3, x4) = move_in_gaag(x1, x4) U1_gaag(x1, x2, x3, x4) = U1_gaag(x4) U2_gaag(x1, x2, x3, x4) = U2_gaag(x4) U3_gaag(x1, x2, x3, x4) = U3_gaag(x4) U4_gaag(x1, x2, x3, x4) = U4_gaag(x4) U5_gaag(x1, x2, x3, x4) = U5_gaag(x4) move_out_gaag(x1, x2, x3, x4) = move_out_gaag U6_gaag(x1, x2, x3, x4, x5) = U6_gaag(x1, x4, x5) U7_gaag(x1, x2, x3, x4, x5, x6) = U7_gaag(x1, x4, x5, x6) U8_gaag(x1, x2, x3, x4, x5, x6, x7) = U8_gaag(x1, x4, x7) U9_gaag(x1, x2, x3, x4, x5) = U9_gaag(x4, x5) U10_gaag(x1, x2, x3, x4, x5) = U10_gaag(x4, x5) U11_gaag(x1, x2, x3, x4, x5, x6) = U11_gaag(x4, x5, x6) move_in_gaga(x1, x2, x3, x4) = move_in_gaga(x1, x3) U1_gaga(x1, x2, x3, x4) = U1_gaga(x2, x4) U2_gaga(x1, x2, x3, x4) = U2_gaga(x2, x4) U3_gaga(x1, x2, x3, x4) = U3_gaga(x2, x4) U4_gaga(x1, x2, x3, x4) = U4_gaga(x4) U5_gaga(x1, x2, x3, x4) = U5_gaga(x4) move_out_gaga(x1, x2, x3, x4) = move_out_gaga U6_gaga(x1, x2, x3, x4, x5) = U6_gaga(x1, x3, x5) U7_gaga(x1, x2, x3, x4, x5, x6) = U7_gaga(x1, x3, x5, x6) U8_gaga(x1, x2, x3, x4, x5, x6, x7) = U8_gaga(x1, x3, x7) U9_gaga(x1, x2, x3, x4, x5) = U9_gaga(x3, x5) U10_gaga(x1, x2, x3, x4, x5) = U10_gaga(x3, x5) U11_gaga(x1, x2, x3, x4, x5, x6) = U11_gaga(x3, x5, x6) U12_gaga(x1, x2, x3, x4, x5, x6) = U12_gaga(x3, x5, x6) U13_gaga(x1, x2, x3, x4, x5) = U13_gaga(x5) U12_gaag(x1, x2, x3, x4, x5, x6) = U12_gaag(x4, x5, x6) move_in_gaaa(x1, x2, x3, x4) = move_in_gaaa(x1) U1_gaaa(x1, x2, x3, x4) = U1_gaaa(x4) U2_gaaa(x1, x2, x3, x4) = U2_gaaa(x4) U3_gaaa(x1, x2, x3, x4) = U3_gaaa(x4) U4_gaaa(x1, x2, x3, x4) = U4_gaaa(x4) U5_gaaa(x1, x2, x3, x4) = U5_gaaa(x4) move_out_gaaa(x1, x2, x3, x4) = move_out_gaaa U6_gaaa(x1, x2, x3, x4, x5) = U6_gaaa(x1, x5) U7_gaaa(x1, x2, x3, x4, x5, x6) = U7_gaaa(x1, x5, x6) U8_gaaa(x1, x2, x3, x4, x5, x6, x7) = U8_gaaa(x1, x7) U9_gaaa(x1, x2, x3, x4, x5) = U9_gaaa(x5) U10_gaaa(x1, x2, x3, x4, x5) = U10_gaaa(x5) U11_gaaa(x1, x2, x3, x4, x5, x6) = U11_gaaa(x5, x6) U12_gaaa(x1, x2, x3, x4, x5, x6) = U12_gaaa(x5, x6) U13_gaaa(x1, x2, x3, x4, x5) = U13_gaaa(x5) U13_gaag(x1, x2, x3, x4, x5) = U13_gaag(x5) MOVE_IN_GGAA(x1, x2, x3, x4) = MOVE_IN_GGAA(x1, x2) U6_GGAA(x1, x2, x3, x4, x5) = U6_GGAA(x1, x2, x5) U7_GGAA(x1, x2, x3, x4, x5, x6) = U7_GGAA(x1, x2, x5, x6) U8_GGAA(x1, x2, x3, x4, x5, x6, x7) = U8_GGAA(x1, x2, x7) U9_GGAA(x1, x2, x3, x4, x5) = U9_GGAA(x2, x5) U10_GGAA(x1, x2, x3, x4, x5) = U10_GGAA(x2, x5) U11_GGAA(x1, x2, x3, x4, x5, x6) = U11_GGAA(x2, x5, x6) U12_GGAA(x1, x2, x3, x4, x5, x6) = U12_GGAA(x2, x5, x6) MOVE_IN_GAAG(x1, x2, x3, x4) = MOVE_IN_GAAG(x1, x4) U6_GAAG(x1, x2, x3, x4, x5) = U6_GAAG(x1, x4, x5) U7_GAAG(x1, x2, x3, x4, x5, x6) = U7_GAAG(x1, x4, x5, x6) U8_GAAG(x1, x2, x3, x4, x5, x6, x7) = U8_GAAG(x1, x4, x7) U9_GAAG(x1, x2, x3, x4, x5) = U9_GAAG(x4, x5) U10_GAAG(x1, x2, x3, x4, x5) = U10_GAAG(x4, x5) U11_GAAG(x1, x2, x3, x4, x5, x6) = U11_GAAG(x4, x5, x6) MOVE_IN_GAGA(x1, x2, x3, x4) = MOVE_IN_GAGA(x1, x3) U6_GAGA(x1, x2, x3, x4, x5) = U6_GAGA(x1, x3, x5) U7_GAGA(x1, x2, x3, x4, x5, x6) = U7_GAGA(x1, x3, x5, x6) U8_GAGA(x1, x2, x3, x4, x5, x6, x7) = U8_GAGA(x1, x3, x7) U9_GAGA(x1, x2, x3, x4, x5) = U9_GAGA(x3, x5) U10_GAGA(x1, x2, x3, x4, x5) = U10_GAGA(x3, x5) U11_GAGA(x1, x2, x3, x4, x5, x6) = U11_GAGA(x3, x5, x6) U12_GAGA(x1, x2, x3, x4, x5, x6) = U12_GAGA(x3, x5, x6) U12_GAAG(x1, x2, x3, x4, x5, x6) = U12_GAAG(x4, x5, x6) We have to consider all (P,R,Pi)-chains ---------------------------------------- (162) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (163) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGAA(N, X, X1, =_out_ag(X3)) -> U8_GGAA(N, X, isGreater_in_gg(X1, X3)) U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_in_ag(U)) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_in_ag(N)) U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_in_ag(succ(zero))) U7_GAAG(N, Z, X1, =_out_ag(X3)) -> U8_GAAG(N, Z, isGreater_in_gg(X1, X3)) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_in_ag(U)) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_in_ag(N)) U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_in_ag(succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_in_ag(N)) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_in_ag(succ(zero))) U7_GAGA(N, Y, X1, =_out_ag(X3)) -> U8_GAGA(N, Y, isGreater_in_gg(X1, X3)) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_in_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (164) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_in_ag(U)) at position [1] we obtained the following new rules [LPAR04]: (U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)),U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U))) ---------------------------------------- (165) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGAA(N, X, X1, =_out_ag(X3)) -> U8_GGAA(N, X, isGreater_in_gg(X1, X3)) U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_in_ag(N)) U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_in_ag(succ(zero))) U7_GAAG(N, Z, X1, =_out_ag(X3)) -> U8_GAAG(N, Z, isGreater_in_gg(X1, X3)) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_in_ag(U)) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_in_ag(N)) U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_in_ag(succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_in_ag(N)) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_in_ag(succ(zero))) U7_GAGA(N, Y, X1, =_out_ag(X3)) -> U8_GAGA(N, Y, isGreater_in_gg(X1, X3)) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_in_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (166) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_in_ag(N)) at position [2] we obtained the following new rules [LPAR04]: (MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)),MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N))) ---------------------------------------- (167) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGAA(N, X, X1, =_out_ag(X3)) -> U8_GGAA(N, X, isGreater_in_gg(X1, X3)) U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_in_ag(succ(zero))) U7_GAAG(N, Z, X1, =_out_ag(X3)) -> U8_GAAG(N, Z, isGreater_in_gg(X1, X3)) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_in_ag(U)) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_in_ag(N)) U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_in_ag(succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_in_ag(N)) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_in_ag(succ(zero))) U7_GAGA(N, Y, X1, =_out_ag(X3)) -> U8_GAGA(N, Y, isGreater_in_gg(X1, X3)) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_in_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (168) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_in_ag(succ(zero))) at position [3] we obtained the following new rules [LPAR04]: (U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_out_ag(succ(zero))),U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_out_ag(succ(zero)))) ---------------------------------------- (169) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGAA(N, X, X1, =_out_ag(X3)) -> U8_GGAA(N, X, isGreater_in_gg(X1, X3)) U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U7_GAAG(N, Z, X1, =_out_ag(X3)) -> U8_GAAG(N, Z, isGreater_in_gg(X1, X3)) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_in_ag(U)) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_in_ag(N)) U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_in_ag(succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_in_ag(N)) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_in_ag(succ(zero))) U7_GAGA(N, Y, X1, =_out_ag(X3)) -> U8_GAGA(N, Y, isGreater_in_gg(X1, X3)) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_in_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (170) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_in_ag(U)) at position [1] we obtained the following new rules [LPAR04]: (U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)),U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U))) ---------------------------------------- (171) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGAA(N, X, X1, =_out_ag(X3)) -> U8_GGAA(N, X, isGreater_in_gg(X1, X3)) U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U7_GAAG(N, Z, X1, =_out_ag(X3)) -> U8_GAAG(N, Z, isGreater_in_gg(X1, X3)) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_in_ag(N)) U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_in_ag(succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_in_ag(N)) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_in_ag(succ(zero))) U7_GAGA(N, Y, X1, =_out_ag(X3)) -> U8_GAGA(N, Y, isGreater_in_gg(X1, X3)) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_in_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_out_ag(succ(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (172) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_in_ag(N)) at position [2] we obtained the following new rules [LPAR04]: (MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)),MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N))) ---------------------------------------- (173) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGAA(N, X, X1, =_out_ag(X3)) -> U8_GGAA(N, X, isGreater_in_gg(X1, X3)) U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U7_GAAG(N, Z, X1, =_out_ag(X3)) -> U8_GAAG(N, Z, isGreater_in_gg(X1, X3)) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_in_ag(succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_in_ag(N)) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_in_ag(succ(zero))) U7_GAGA(N, Y, X1, =_out_ag(X3)) -> U8_GAGA(N, Y, isGreater_in_gg(X1, X3)) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_in_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_out_ag(succ(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (174) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_in_ag(succ(zero))) at position [3] we obtained the following new rules [LPAR04]: (U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_out_ag(succ(zero))),U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_out_ag(succ(zero)))) ---------------------------------------- (175) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGAA(N, X, X1, =_out_ag(X3)) -> U8_GGAA(N, X, isGreater_in_gg(X1, X3)) U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U7_GAAG(N, Z, X1, =_out_ag(X3)) -> U8_GAAG(N, Z, isGreater_in_gg(X1, X3)) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_in_ag(N)) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_in_ag(succ(zero))) U7_GAGA(N, Y, X1, =_out_ag(X3)) -> U8_GAGA(N, Y, isGreater_in_gg(X1, X3)) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_in_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_out_ag(succ(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (176) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_in_ag(N)) at position [2] we obtained the following new rules [LPAR04]: (MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)),MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N))) ---------------------------------------- (177) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGAA(N, X, X1, =_out_ag(X3)) -> U8_GGAA(N, X, isGreater_in_gg(X1, X3)) U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U7_GAAG(N, Z, X1, =_out_ag(X3)) -> U8_GAAG(N, Z, isGreater_in_gg(X1, X3)) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_in_ag(succ(zero))) U7_GAGA(N, Y, X1, =_out_ag(X3)) -> U8_GAGA(N, Y, isGreater_in_gg(X1, X3)) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_in_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_out_ag(succ(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_out_ag(succ(zero))) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (178) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_in_ag(succ(zero))) at position [3] we obtained the following new rules [LPAR04]: (U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_out_ag(succ(zero))),U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_out_ag(succ(zero)))) ---------------------------------------- (179) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGAA(N, X, X1, =_out_ag(X3)) -> U8_GGAA(N, X, isGreater_in_gg(X1, X3)) U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U7_GAAG(N, Z, X1, =_out_ag(X3)) -> U8_GAAG(N, Z, isGreater_in_gg(X1, X3)) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U7_GAGA(N, Y, X1, =_out_ag(X3)) -> U8_GAGA(N, Y, isGreater_in_gg(X1, X3)) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_in_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_out_ag(succ(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_out_ag(succ(zero))) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (180) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_in_ag(U)) at position [1] we obtained the following new rules [LPAR04]: (U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)),U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U))) ---------------------------------------- (181) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGAA(N, X, X1, =_out_ag(X3)) -> U8_GGAA(N, X, isGreater_in_gg(X1, X3)) U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U7_GAAG(N, Z, X1, =_out_ag(X3)) -> U8_GAAG(N, Z, isGreater_in_gg(X1, X3)) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U7_GAGA(N, Y, X1, =_out_ag(X3)) -> U8_GAGA(N, Y, isGreater_in_gg(X1, X3)) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_out_ag(succ(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_out_ag(succ(zero))) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_out_ag(succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (182) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GGAA(N, X, X1, =_out_ag(X3)) -> U8_GGAA(N, X, isGreater_in_gg(X1, X3)) we obtained the following new rules [LPAR04]: (U7_GGAA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z2, succ(zero))),U7_GGAA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z2, succ(zero)))) ---------------------------------------- (183) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U7_GAAG(N, Z, X1, =_out_ag(X3)) -> U8_GAAG(N, Z, isGreater_in_gg(X1, X3)) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U7_GAGA(N, Y, X1, =_out_ag(X3)) -> U8_GAGA(N, Y, isGreater_in_gg(X1, X3)) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_out_ag(succ(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_out_ag(succ(zero))) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_out_ag(succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U7_GGAA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z2, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (184) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GAAG(N, Z, X1, =_out_ag(X3)) -> U8_GAAG(N, Z, isGreater_in_gg(X1, X3)) we obtained the following new rules [LPAR04]: (U7_GAAG(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z2, succ(zero))),U7_GAAG(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z2, succ(zero)))) ---------------------------------------- (185) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U7_GAGA(N, Y, X1, =_out_ag(X3)) -> U8_GAGA(N, Y, isGreater_in_gg(X1, X3)) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_out_ag(succ(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_out_ag(succ(zero))) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_out_ag(succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U7_GGAA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z2, succ(zero))) U7_GAAG(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z2, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (186) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GAGA(N, Y, X1, =_out_ag(X3)) -> U8_GAGA(N, Y, isGreater_in_gg(X1, X3)) we obtained the following new rules [LPAR04]: (U7_GAGA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z2, succ(zero))),U7_GAGA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z2, succ(zero)))) ---------------------------------------- (187) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_out_ag(succ(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_out_ag(succ(zero))) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_out_ag(succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U7_GGAA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z2, succ(zero))) U7_GAAG(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z2, succ(zero))) U7_GAGA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z2, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (188) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U6_GAAG(N, Z, =_out_ag(X1)) -> U7_GAAG(N, Z, X1, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))),U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero)))) ---------------------------------------- (189) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_out_ag(succ(zero))) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_out_ag(succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U7_GGAA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z2, succ(zero))) U7_GAAG(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z2, succ(zero))) U7_GAGA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z2, succ(zero))) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (190) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U6_GGAA(N, X, =_out_ag(X1)) -> U7_GGAA(N, X, X1, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))),U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero)))) ---------------------------------------- (191) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_out_ag(succ(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U7_GGAA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z2, succ(zero))) U7_GAAG(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z2, succ(zero))) U7_GAGA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z2, succ(zero))) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (192) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U6_GAGA(N, Y, =_out_ag(X1)) -> U7_GAGA(N, Y, X1, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))),U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero)))) ---------------------------------------- (193) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U7_GGAA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z2, succ(zero))) U7_GAAG(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z2, succ(zero))) U7_GAGA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z2, succ(zero))) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (194) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GGAA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z2, succ(zero))) we obtained the following new rules [LPAR04]: (U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))),U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero)))) ---------------------------------------- (195) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U7_GAAG(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z2, succ(zero))) U7_GAGA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z2, succ(zero))) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (196) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GAAG(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z2, succ(zero))) we obtained the following new rules [LPAR04]: (U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))),U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero)))) ---------------------------------------- (197) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U7_GAGA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z2, succ(zero))) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (198) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GAGA(z0, z1, z2, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z2, succ(zero))) we obtained the following new rules [LPAR04]: (U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))),U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero)))) ---------------------------------------- (199) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (200) TransformationProof (SOUND) By narrowing [LPAR04] the rule U8_GGAA(N, X, isGreater_out_gg) -> U9_GGAA(X, isMinus_in_gga(N, succ(zero))) at position [1] we obtained the following new rules [LPAR04]: (U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, U18_gga(isMinus_in_gga(zero, zero))),U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, U18_gga(isMinus_in_gga(zero, zero)))) (U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U20_gga(isMinus_in_gga(x0, zero))),U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U20_gga(isMinus_in_gga(x0, zero)))) (U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U22_gga(isMinus_in_gga(x0, zero))),U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U22_gga(isMinus_in_gga(x0, zero)))) ---------------------------------------- (201) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, U18_gga(isMinus_in_gga(zero, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U20_gga(isMinus_in_gga(x0, zero))) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U22_gga(isMinus_in_gga(x0, zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (202) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, U18_gga(isMinus_in_gga(zero, zero))) at position [1,0] we obtained the following new rules [LPAR04]: (U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, U18_gga(isMinus_out_gga(zero))),U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, U18_gga(isMinus_out_gga(zero)))) ---------------------------------------- (203) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U20_gga(isMinus_in_gga(x0, zero))) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U22_gga(isMinus_in_gga(x0, zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, U18_gga(isMinus_out_gga(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (204) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U20_gga(isMinus_in_gga(x0, zero))) at position [1,0] we obtained the following new rules [LPAR04]: (U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U20_gga(isMinus_out_gga(x0))),U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U20_gga(isMinus_out_gga(x0)))) ---------------------------------------- (205) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U22_gga(isMinus_in_gga(x0, zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, U18_gga(isMinus_out_gga(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U20_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (206) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U22_gga(isMinus_in_gga(x0, zero))) at position [1,0] we obtained the following new rules [LPAR04]: (U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U22_gga(isMinus_out_gga(x0))),U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U22_gga(isMinus_out_gga(x0)))) ---------------------------------------- (207) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, U18_gga(isMinus_out_gga(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U20_gga(isMinus_out_gga(x0))) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U22_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (208) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, U18_gga(isMinus_out_gga(zero))) at position [1] we obtained the following new rules [LPAR04]: (U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))),U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero)))) ---------------------------------------- (209) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U20_gga(isMinus_out_gga(x0))) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U22_gga(isMinus_out_gga(x0))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (210) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U20_gga(isMinus_out_gga(x0))) at position [1] we obtained the following new rules [LPAR04]: (U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)),U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0))) ---------------------------------------- (211) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U22_gga(isMinus_out_gga(x0))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (212) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, U22_gga(isMinus_out_gga(x0))) at position [1] we obtained the following new rules [LPAR04]: (U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))),U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0))))) ---------------------------------------- (213) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (214) TransformationProof (SOUND) By narrowing [LPAR04] the rule U10_GGAA(X, =_out_ag(M)) -> U11_GGAA(X, M, move_in_ggaa(M, X)) at position [2] we obtained the following new rules [LPAR04]: (U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U1_ggaa(x0, write_in_g('Move top disk from '))),U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U1_ggaa(x0, write_in_g('Move top disk from ')))) (U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_in_ag(x0))),U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_in_ag(x0)))) ---------------------------------------- (215) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U1_ggaa(x0, write_in_g('Move top disk from '))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_in_ag(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (216) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U1_ggaa(x0, write_in_g('Move top disk from '))) at position [2,1] we obtained the following new rules [LPAR04]: (U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U1_ggaa(x0, write_out_g)),U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U1_ggaa(x0, write_out_g))) ---------------------------------------- (217) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_in_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U1_ggaa(x0, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (218) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_in_ag(x0))) at position [2,2] we obtained the following new rules [LPAR04]: (U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))),U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0)))) ---------------------------------------- (219) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U1_ggaa(x0, write_out_g)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (220) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U1_ggaa(x0, write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U2_ggaa(write_in_g(x0))),U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U2_ggaa(write_in_g(x0)))) ---------------------------------------- (221) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U2_ggaa(write_in_g(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (222) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U2_ggaa(write_in_g(x0))) at position [2,0] we obtained the following new rules [LPAR04]: (U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U2_ggaa(write_out_g)),U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U2_ggaa(write_out_g))) ---------------------------------------- (223) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U2_ggaa(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (224) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U2_ggaa(write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U3_ggaa(write_in_g(' to '))),U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U3_ggaa(write_in_g(' to ')))) ---------------------------------------- (225) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U3_ggaa(write_in_g(' to '))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (226) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U3_ggaa(write_in_g(' to '))) at position [2,0] we obtained the following new rules [LPAR04]: (U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U3_ggaa(write_out_g)),U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U3_ggaa(write_out_g))) ---------------------------------------- (227) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U3_ggaa(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (228) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U3_ggaa(write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U4_ggaa(write_in_a)),U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U4_ggaa(write_in_a))) ---------------------------------------- (229) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U4_ggaa(write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (230) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U4_ggaa(write_in_a)) at position [2,0] we obtained the following new rules [LPAR04]: (U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U4_ggaa(write_out_a)),U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U4_ggaa(write_out_a))) ---------------------------------------- (231) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U4_ggaa(write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (232) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U4_ggaa(write_out_a)) at position [2] we obtained the following new rules [LPAR04]: (U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U5_ggaa(nl_in_)),U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U5_ggaa(nl_in_))) ---------------------------------------- (233) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U5_ggaa(nl_in_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (234) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U5_ggaa(nl_in_)) at position [2,0] we obtained the following new rules [LPAR04]: (U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U5_ggaa(nl_out_)),U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U5_ggaa(nl_out_))) ---------------------------------------- (235) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U5_ggaa(nl_out_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (236) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), U5_ggaa(nl_out_)) at position [2] we obtained the following new rules [LPAR04]: (U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa),U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa)) ---------------------------------------- (237) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (238) TransformationProof (SOUND) By narrowing [LPAR04] the rule U11_GGAA(X, M, move_out_ggaa) -> U12_GGAA(X, M, move_in_ggaa(succ(zero), X)) at position [2] we obtained the following new rules [LPAR04]: (U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U1_ggaa(x0, write_in_g('Move top disk from '))),U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U1_ggaa(x0, write_in_g('Move top disk from ')))) (U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_in_ag(succ(zero)))),U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_in_ag(succ(zero))))) ---------------------------------------- (239) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U1_ggaa(x0, write_in_g('Move top disk from '))) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_in_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (240) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U1_ggaa(x0, write_in_g('Move top disk from '))) at position [2,1] we obtained the following new rules [LPAR04]: (U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U1_ggaa(x0, write_out_g)),U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U1_ggaa(x0, write_out_g))) ---------------------------------------- (241) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_in_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U1_ggaa(x0, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (242) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_in_ag(succ(zero)))) at position [2,2] we obtained the following new rules [LPAR04]: (U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))),U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero))))) ---------------------------------------- (243) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U1_ggaa(x0, write_out_g)) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (244) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U1_ggaa(x0, write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U2_ggaa(write_in_g(x0))),U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U2_ggaa(write_in_g(x0)))) ---------------------------------------- (245) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U2_ggaa(write_in_g(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (246) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U2_ggaa(write_in_g(x0))) at position [2,0] we obtained the following new rules [LPAR04]: (U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U2_ggaa(write_out_g)),U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U2_ggaa(write_out_g))) ---------------------------------------- (247) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U2_ggaa(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (248) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U2_ggaa(write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U3_ggaa(write_in_g(' to '))),U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U3_ggaa(write_in_g(' to ')))) ---------------------------------------- (249) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U3_ggaa(write_in_g(' to '))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (250) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U3_ggaa(write_in_g(' to '))) at position [2,0] we obtained the following new rules [LPAR04]: (U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U3_ggaa(write_out_g)),U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U3_ggaa(write_out_g))) ---------------------------------------- (251) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U3_ggaa(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (252) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U3_ggaa(write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U4_ggaa(write_in_a)),U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U4_ggaa(write_in_a))) ---------------------------------------- (253) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U4_ggaa(write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (254) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U4_ggaa(write_in_a)) at position [2,0] we obtained the following new rules [LPAR04]: (U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U4_ggaa(write_out_a)),U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U4_ggaa(write_out_a))) ---------------------------------------- (255) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U4_ggaa(write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (256) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U4_ggaa(write_out_a)) at position [2] we obtained the following new rules [LPAR04]: (U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U5_ggaa(nl_in_)),U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U5_ggaa(nl_in_))) ---------------------------------------- (257) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U5_ggaa(nl_in_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (258) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U5_ggaa(nl_in_)) at position [2,0] we obtained the following new rules [LPAR04]: (U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U5_ggaa(nl_out_)),U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U5_ggaa(nl_out_))) ---------------------------------------- (259) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U5_ggaa(nl_out_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (260) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, U5_ggaa(nl_out_)) at position [2] we obtained the following new rules [LPAR04]: (U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa),U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa)) ---------------------------------------- (261) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (262) TransformationProof (SOUND) By narrowing [LPAR04] the rule U8_GAAG(N, Z, isGreater_out_gg) -> U9_GAAG(Z, isMinus_in_gga(N, succ(zero))) at position [1] we obtained the following new rules [LPAR04]: (U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, U18_gga(isMinus_in_gga(zero, zero))),U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, U18_gga(isMinus_in_gga(zero, zero)))) (U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U20_gga(isMinus_in_gga(x0, zero))),U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U20_gga(isMinus_in_gga(x0, zero)))) (U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U22_gga(isMinus_in_gga(x0, zero))),U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U22_gga(isMinus_in_gga(x0, zero)))) ---------------------------------------- (263) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, U18_gga(isMinus_in_gga(zero, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U20_gga(isMinus_in_gga(x0, zero))) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U22_gga(isMinus_in_gga(x0, zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (264) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, U18_gga(isMinus_in_gga(zero, zero))) at position [1,0] we obtained the following new rules [LPAR04]: (U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, U18_gga(isMinus_out_gga(zero))),U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, U18_gga(isMinus_out_gga(zero)))) ---------------------------------------- (265) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U20_gga(isMinus_in_gga(x0, zero))) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U22_gga(isMinus_in_gga(x0, zero))) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, U18_gga(isMinus_out_gga(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (266) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U20_gga(isMinus_in_gga(x0, zero))) at position [1,0] we obtained the following new rules [LPAR04]: (U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U20_gga(isMinus_out_gga(x0))),U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U20_gga(isMinus_out_gga(x0)))) ---------------------------------------- (267) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U22_gga(isMinus_in_gga(x0, zero))) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, U18_gga(isMinus_out_gga(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U20_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (268) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U22_gga(isMinus_in_gga(x0, zero))) at position [1,0] we obtained the following new rules [LPAR04]: (U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U22_gga(isMinus_out_gga(x0))),U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U22_gga(isMinus_out_gga(x0)))) ---------------------------------------- (269) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, U18_gga(isMinus_out_gga(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U20_gga(isMinus_out_gga(x0))) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U22_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (270) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, U18_gga(isMinus_out_gga(zero))) at position [1] we obtained the following new rules [LPAR04]: (U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))),U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero)))) ---------------------------------------- (271) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U20_gga(isMinus_out_gga(x0))) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U22_gga(isMinus_out_gga(x0))) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (272) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U20_gga(isMinus_out_gga(x0))) at position [1] we obtained the following new rules [LPAR04]: (U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)),U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0))) ---------------------------------------- (273) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U22_gga(isMinus_out_gga(x0))) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (274) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, U22_gga(isMinus_out_gga(x0))) at position [1] we obtained the following new rules [LPAR04]: (U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))),U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0))))) ---------------------------------------- (275) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (276) TransformationProof (SOUND) By narrowing [LPAR04] the rule U10_GAAG(Z, =_out_ag(M)) -> U11_GAAG(Z, M, move_in_gaga(M, Z)) at position [2] we obtained the following new rules [LPAR04]: (U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U1_gaga(x0, write_in_g('Move top disk from '))),U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U1_gaga(x0, write_in_g('Move top disk from ')))) (U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_in_ag(x0))),U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_in_ag(x0)))) ---------------------------------------- (277) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U1_gaga(x0, write_in_g('Move top disk from '))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_in_ag(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (278) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U1_gaga(x0, write_in_g('Move top disk from '))) at position [2,1] we obtained the following new rules [LPAR04]: (U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U1_gaga(x0, write_out_g)),U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U1_gaga(x0, write_out_g))) ---------------------------------------- (279) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_in_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U1_gaga(x0, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (280) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_in_ag(x0))) at position [2,2] we obtained the following new rules [LPAR04]: (U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))),U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0)))) ---------------------------------------- (281) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U1_gaga(x0, write_out_g)) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (282) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U1_gaga(x0, write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U2_gaga(x0, write_in_a)),U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U2_gaga(x0, write_in_a))) ---------------------------------------- (283) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U2_gaga(x0, write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (284) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U2_gaga(x0, write_in_a)) at position [2,1] we obtained the following new rules [LPAR04]: (U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U2_gaga(x0, write_out_a)),U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U2_gaga(x0, write_out_a))) ---------------------------------------- (285) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U2_gaga(x0, write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (286) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U2_gaga(x0, write_out_a)) at position [2] we obtained the following new rules [LPAR04]: (U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U3_gaga(x0, write_in_g(' to '))),U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U3_gaga(x0, write_in_g(' to ')))) ---------------------------------------- (287) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U3_gaga(x0, write_in_g(' to '))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (288) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U3_gaga(x0, write_in_g(' to '))) at position [2,1] we obtained the following new rules [LPAR04]: (U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U3_gaga(x0, write_out_g)),U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U3_gaga(x0, write_out_g))) ---------------------------------------- (289) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U3_gaga(x0, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (290) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U3_gaga(x0, write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U4_gaga(write_in_g(x0))),U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U4_gaga(write_in_g(x0)))) ---------------------------------------- (291) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U4_gaga(write_in_g(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (292) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U4_gaga(write_in_g(x0))) at position [2,0] we obtained the following new rules [LPAR04]: (U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U4_gaga(write_out_g)),U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U4_gaga(write_out_g))) ---------------------------------------- (293) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U4_gaga(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (294) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U4_gaga(write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U5_gaga(nl_in_)),U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U5_gaga(nl_in_))) ---------------------------------------- (295) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U5_gaga(nl_in_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (296) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U5_gaga(nl_in_)) at position [2,0] we obtained the following new rules [LPAR04]: (U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U5_gaga(nl_out_)),U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U5_gaga(nl_out_))) ---------------------------------------- (297) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U5_gaga(nl_out_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (298) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), U5_gaga(nl_out_)) at position [2] we obtained the following new rules [LPAR04]: (U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga),U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga)) ---------------------------------------- (299) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (300) TransformationProof (SOUND) By narrowing [LPAR04] the rule U11_GAAG(Z, M, move_out_gaga) -> U12_GAAG(Z, M, move_in_gaaa(succ(zero))) at position [2] we obtained the following new rules [LPAR04]: (U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U1_gaaa(write_in_g('Move top disk from '))),U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U1_gaaa(write_in_g('Move top disk from ')))) (U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_in_ag(succ(zero)))),U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_in_ag(succ(zero))))) ---------------------------------------- (301) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U1_gaaa(write_in_g('Move top disk from '))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_in_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (302) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U1_gaaa(write_in_g('Move top disk from '))) at position [2,0] we obtained the following new rules [LPAR04]: (U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U1_gaaa(write_out_g)),U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U1_gaaa(write_out_g))) ---------------------------------------- (303) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_in_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U1_gaaa(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (304) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_in_ag(succ(zero)))) at position [2,1] we obtained the following new rules [LPAR04]: (U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))),U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero))))) ---------------------------------------- (305) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U1_gaaa(write_out_g)) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (306) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U1_gaaa(write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U2_gaaa(write_in_a)),U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U2_gaaa(write_in_a))) ---------------------------------------- (307) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U2_gaaa(write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (308) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U2_gaaa(write_in_a)) at position [2,0] we obtained the following new rules [LPAR04]: (U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U2_gaaa(write_out_a)),U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U2_gaaa(write_out_a))) ---------------------------------------- (309) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U2_gaaa(write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (310) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U2_gaaa(write_out_a)) at position [2] we obtained the following new rules [LPAR04]: (U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U3_gaaa(write_in_g(' to '))),U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U3_gaaa(write_in_g(' to ')))) ---------------------------------------- (311) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U3_gaaa(write_in_g(' to '))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (312) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U3_gaaa(write_in_g(' to '))) at position [2,0] we obtained the following new rules [LPAR04]: (U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U3_gaaa(write_out_g)),U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U3_gaaa(write_out_g))) ---------------------------------------- (313) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U3_gaaa(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (314) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U3_gaaa(write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U4_gaaa(write_in_a)),U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U4_gaaa(write_in_a))) ---------------------------------------- (315) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U4_gaaa(write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (316) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U4_gaaa(write_in_a)) at position [2,0] we obtained the following new rules [LPAR04]: (U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U4_gaaa(write_out_a)),U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U4_gaaa(write_out_a))) ---------------------------------------- (317) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U4_gaaa(write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (318) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U4_gaaa(write_out_a)) at position [2] we obtained the following new rules [LPAR04]: (U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U5_gaaa(nl_in_)),U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U5_gaaa(nl_in_))) ---------------------------------------- (319) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U5_gaaa(nl_in_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (320) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U5_gaaa(nl_in_)) at position [2,0] we obtained the following new rules [LPAR04]: (U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U5_gaaa(nl_out_)),U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U5_gaaa(nl_out_))) ---------------------------------------- (321) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U5_gaaa(nl_out_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (322) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U5_gaaa(nl_out_)) at position [2] we obtained the following new rules [LPAR04]: (U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa),U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa)) ---------------------------------------- (323) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (324) TransformationProof (SOUND) By narrowing [LPAR04] the rule U8_GAGA(N, Y, isGreater_out_gg) -> U9_GAGA(Y, isMinus_in_gga(N, succ(zero))) at position [1] we obtained the following new rules [LPAR04]: (U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, U18_gga(isMinus_in_gga(zero, zero))),U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, U18_gga(isMinus_in_gga(zero, zero)))) (U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U20_gga(isMinus_in_gga(x0, zero))),U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U20_gga(isMinus_in_gga(x0, zero)))) (U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U22_gga(isMinus_in_gga(x0, zero))),U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U22_gga(isMinus_in_gga(x0, zero)))) ---------------------------------------- (325) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, U18_gga(isMinus_in_gga(zero, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U20_gga(isMinus_in_gga(x0, zero))) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U22_gga(isMinus_in_gga(x0, zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (326) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, U18_gga(isMinus_in_gga(zero, zero))) at position [1,0] we obtained the following new rules [LPAR04]: (U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, U18_gga(isMinus_out_gga(zero))),U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, U18_gga(isMinus_out_gga(zero)))) ---------------------------------------- (327) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U20_gga(isMinus_in_gga(x0, zero))) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U22_gga(isMinus_in_gga(x0, zero))) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, U18_gga(isMinus_out_gga(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (328) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U20_gga(isMinus_in_gga(x0, zero))) at position [1,0] we obtained the following new rules [LPAR04]: (U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U20_gga(isMinus_out_gga(x0))),U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U20_gga(isMinus_out_gga(x0)))) ---------------------------------------- (329) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U22_gga(isMinus_in_gga(x0, zero))) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, U18_gga(isMinus_out_gga(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U20_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (330) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U22_gga(isMinus_in_gga(x0, zero))) at position [1,0] we obtained the following new rules [LPAR04]: (U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U22_gga(isMinus_out_gga(x0))),U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U22_gga(isMinus_out_gga(x0)))) ---------------------------------------- (331) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, U18_gga(isMinus_out_gga(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U20_gga(isMinus_out_gga(x0))) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U22_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (332) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, U18_gga(isMinus_out_gga(zero))) at position [1] we obtained the following new rules [LPAR04]: (U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))),U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero)))) ---------------------------------------- (333) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U20_gga(isMinus_out_gga(x0))) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U22_gga(isMinus_out_gga(x0))) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (334) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U20_gga(isMinus_out_gga(x0))) at position [1] we obtained the following new rules [LPAR04]: (U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)),U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0))) ---------------------------------------- (335) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U22_gga(isMinus_out_gga(x0))) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (336) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, U22_gga(isMinus_out_gga(x0))) at position [1] we obtained the following new rules [LPAR04]: (U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))),U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0))))) ---------------------------------------- (337) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (338) TransformationProof (SOUND) By narrowing [LPAR04] the rule U10_GAGA(Y, =_out_ag(M)) -> U11_GAGA(Y, M, move_in_gaag(M, Y)) at position [2] we obtained the following new rules [LPAR04]: (U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U1_gaag(write_in_g('Move top disk from '))),U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U1_gaag(write_in_g('Move top disk from ')))) (U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_in_ag(x0))),U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_in_ag(x0)))) ---------------------------------------- (339) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U1_gaag(write_in_g('Move top disk from '))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_in_ag(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (340) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U1_gaag(write_in_g('Move top disk from '))) at position [2,0] we obtained the following new rules [LPAR04]: (U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U1_gaag(write_out_g)),U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U1_gaag(write_out_g))) ---------------------------------------- (341) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_in_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U1_gaag(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (342) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_in_ag(x0))) at position [2,2] we obtained the following new rules [LPAR04]: (U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))),U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0)))) ---------------------------------------- (343) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U1_gaag(write_out_g)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (344) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U1_gaag(write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U2_gaag(write_in_a)),U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U2_gaag(write_in_a))) ---------------------------------------- (345) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U2_gaag(write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (346) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U2_gaag(write_in_a)) at position [2,0] we obtained the following new rules [LPAR04]: (U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U2_gaag(write_out_a)),U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U2_gaag(write_out_a))) ---------------------------------------- (347) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U2_gaag(write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (348) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U2_gaag(write_out_a)) at position [2] we obtained the following new rules [LPAR04]: (U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U3_gaag(write_in_g(' to '))),U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U3_gaag(write_in_g(' to ')))) ---------------------------------------- (349) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U3_gaag(write_in_g(' to '))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (350) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U3_gaag(write_in_g(' to '))) at position [2,0] we obtained the following new rules [LPAR04]: (U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U3_gaag(write_out_g)),U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U3_gaag(write_out_g))) ---------------------------------------- (351) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U3_gaag(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (352) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U3_gaag(write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U4_gaag(write_in_a)),U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U4_gaag(write_in_a))) ---------------------------------------- (353) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U4_gaag(write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (354) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U4_gaag(write_in_a)) at position [2,0] we obtained the following new rules [LPAR04]: (U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U4_gaag(write_out_a)),U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U4_gaag(write_out_a))) ---------------------------------------- (355) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U4_gaag(write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (356) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U4_gaag(write_out_a)) at position [2] we obtained the following new rules [LPAR04]: (U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U5_gaag(nl_in_)),U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U5_gaag(nl_in_))) ---------------------------------------- (357) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U5_gaag(nl_in_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (358) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U5_gaag(nl_in_)) at position [2,0] we obtained the following new rules [LPAR04]: (U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U5_gaag(nl_out_)),U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U5_gaag(nl_out_))) ---------------------------------------- (359) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U5_gaag(nl_out_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (360) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), U5_gaag(nl_out_)) at position [2] we obtained the following new rules [LPAR04]: (U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag),U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag)) ---------------------------------------- (361) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (362) TransformationProof (SOUND) By narrowing [LPAR04] the rule U11_GAGA(Y, M, move_out_gaag) -> U12_GAGA(Y, M, move_in_gaga(succ(zero), Y)) at position [2] we obtained the following new rules [LPAR04]: (U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U1_gaga(x0, write_in_g('Move top disk from '))),U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U1_gaga(x0, write_in_g('Move top disk from ')))) (U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_in_ag(succ(zero)))),U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_in_ag(succ(zero))))) ---------------------------------------- (363) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U1_gaga(x0, write_in_g('Move top disk from '))) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_in_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (364) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U1_gaga(x0, write_in_g('Move top disk from '))) at position [2,1] we obtained the following new rules [LPAR04]: (U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U1_gaga(x0, write_out_g)),U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U1_gaga(x0, write_out_g))) ---------------------------------------- (365) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_in_ag(succ(zero)))) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U1_gaga(x0, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (366) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_in_ag(succ(zero)))) at position [2,2] we obtained the following new rules [LPAR04]: (U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))),U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero))))) ---------------------------------------- (367) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U1_gaga(x0, write_out_g)) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (368) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U1_gaga(x0, write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U2_gaga(x0, write_in_a)),U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U2_gaga(x0, write_in_a))) ---------------------------------------- (369) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U2_gaga(x0, write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (370) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U2_gaga(x0, write_in_a)) at position [2,1] we obtained the following new rules [LPAR04]: (U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U2_gaga(x0, write_out_a)),U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U2_gaga(x0, write_out_a))) ---------------------------------------- (371) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U2_gaga(x0, write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (372) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U2_gaga(x0, write_out_a)) at position [2] we obtained the following new rules [LPAR04]: (U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U3_gaga(x0, write_in_g(' to '))),U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U3_gaga(x0, write_in_g(' to ')))) ---------------------------------------- (373) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U3_gaga(x0, write_in_g(' to '))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (374) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U3_gaga(x0, write_in_g(' to '))) at position [2,1] we obtained the following new rules [LPAR04]: (U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U3_gaga(x0, write_out_g)),U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U3_gaga(x0, write_out_g))) ---------------------------------------- (375) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U3_gaga(x0, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (376) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U3_gaga(x0, write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U4_gaga(write_in_g(x0))),U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U4_gaga(write_in_g(x0)))) ---------------------------------------- (377) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U4_gaga(write_in_g(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (378) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U4_gaga(write_in_g(x0))) at position [2,0] we obtained the following new rules [LPAR04]: (U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U4_gaga(write_out_g)),U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U4_gaga(write_out_g))) ---------------------------------------- (379) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U4_gaga(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (380) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U4_gaga(write_out_g)) at position [2] we obtained the following new rules [LPAR04]: (U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U5_gaga(nl_in_)),U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U5_gaga(nl_in_))) ---------------------------------------- (381) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U5_gaga(nl_in_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (382) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U5_gaga(nl_in_)) at position [2,0] we obtained the following new rules [LPAR04]: (U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U5_gaga(nl_out_)),U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U5_gaga(nl_out_))) ---------------------------------------- (383) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U5_gaga(nl_out_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (384) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, U5_gaga(nl_out_)) at position [2] we obtained the following new rules [LPAR04]: (U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga),U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga)) ---------------------------------------- (385) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (386) TransformationProof (SOUND) By narrowing [LPAR04] the rule U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GGAA(z0, z1, isGreater_in_gg(z0, succ(zero))) at position [2] we obtained the following new rules [LPAR04]: (U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))),U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero)))) ---------------------------------------- (387) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GGAA(zero, y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U8_GGAA(pred(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (388) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes. ---------------------------------------- (389) Obligation: Q DP problem: The TRS P consists of the following rules: MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (390) TransformationProof (SOUND) By narrowing [LPAR04] the rule U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAAG(z0, z1, isGreater_in_gg(z0, succ(zero))) at position [2] we obtained the following new rules [LPAR04]: (U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))),U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero)))) ---------------------------------------- (391) Obligation: Q DP problem: The TRS P consists of the following rules: MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U8_GAAG(zero, y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(zero))) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U8_GAAG(pred(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(pred(pred(x0)))) U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (392) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes. ---------------------------------------- (393) Obligation: Q DP problem: The TRS P consists of the following rules: U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (394) TransformationProof (SOUND) By narrowing [LPAR04] the rule U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) -> U8_GAGA(z0, z1, isGreater_in_gg(z0, succ(zero))) at position [2] we obtained the following new rules [LPAR04]: (U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))),U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero)))) ---------------------------------------- (395) Obligation: Q DP problem: The TRS P consists of the following rules: U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U8_GAGA(zero, y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(zero))) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U8_GAGA(pred(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(pred(pred(x0)))) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (396) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes. ---------------------------------------- (397) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (398) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U6_GAGA(z0, z1, =_out_ag(z0)) -> U7_GAGA(z0, z1, z0, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))),U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero)))) ---------------------------------------- (399) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (400) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule MOVE_IN_GAGA(N, Y) -> U6_GAGA(N, Y, =_out_ag(N)) we obtained the following new rules [LPAR04]: (MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))),MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0)))) ---------------------------------------- (401) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (402) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U10_GAAG(Z, =_out_ag(M)) -> MOVE_IN_GAGA(M, Z) we obtained the following new rules [LPAR04]: (U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0),U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0)) ---------------------------------------- (403) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (404) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U6_GAAG(z0, z1, =_out_ag(z0)) -> U7_GAAG(z0, z1, z0, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))),U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero)))) ---------------------------------------- (405) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (406) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule MOVE_IN_GAAG(N, Z) -> U6_GAAG(N, Z, =_out_ag(N)) we obtained the following new rules [LPAR04]: (MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))),MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0)))) ---------------------------------------- (407) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (408) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U10_GAGA(Y, =_out_ag(M)) -> MOVE_IN_GAAG(M, Y) we obtained the following new rules [LPAR04]: (U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0),U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0)) ---------------------------------------- (409) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (410) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U12_GAGA(Y, M, move_out_gaga) -> MOVE_IN_GAGA(M, Y) we obtained the following new rules [LPAR04]: (U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0),U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0)) ---------------------------------------- (411) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (412) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GAGA(x1, y1, move_out_gaag) -> U12_GAGA(x1, y1, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) we obtained the following new rules [LPAR04]: (U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))),U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero))))) ---------------------------------------- (413) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (414) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GAGA(x0, y1, move_out_gaag) -> U12_GAGA(x0, y1, move_out_gaga) we obtained the following new rules [LPAR04]: (U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga),U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga)) ---------------------------------------- (415) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (416) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U6_GGAA(z0, z1, =_out_ag(z0)) -> U7_GGAA(z0, z1, z0, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))),U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero)))) ---------------------------------------- (417) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (418) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule MOVE_IN_GGAA(N, X) -> U6_GGAA(N, X, =_out_ag(N)) we obtained the following new rules [LPAR04]: (MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))),MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0)))) ---------------------------------------- (419) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (420) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U12_GAAG(Z, M, move_out_gaaa) -> MOVE_IN_GGAA(M, Z) we obtained the following new rules [LPAR04]: (U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0),U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0)) ---------------------------------------- (421) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (422) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, U6_gaaa(succ(zero), =_out_ag(succ(zero)))) we obtained the following new rules [LPAR04]: (U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))),U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero))))) ---------------------------------------- (423) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (424) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U10_GGAA(X, =_out_ag(M)) -> MOVE_IN_GGAA(M, X) we obtained the following new rules [LPAR04]: (U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0),U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0)) ---------------------------------------- (425) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (426) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U12_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GAAG(M, X) we obtained the following new rules [LPAR04]: (U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0),U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0)) ---------------------------------------- (427) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0) U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (428) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GGAA(x1, y1, move_out_ggaa) -> U12_GGAA(x1, y1, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) we obtained the following new rules [LPAR04]: (U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))),U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero))))) ---------------------------------------- (429) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0) U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (430) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GGAA(x0, y1, move_out_ggaa) -> U12_GGAA(x0, y1, move_out_ggaa) we obtained the following new rules [LPAR04]: (U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), move_out_ggaa),U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), move_out_ggaa)) ---------------------------------------- (431) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0) U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), move_out_ggaa) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (432) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GAAG(y0, y1, move_out_gaga) -> U12_GAAG(y0, y1, move_out_gaaa) we obtained the following new rules [LPAR04]: (U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), move_out_gaaa),U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), move_out_gaaa)) ---------------------------------------- (433) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0) U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), move_out_ggaa) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), move_out_gaaa) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (434) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U10_GAAG(x1, =_out_ag(x0)) -> U11_GAAG(x1, x0, U6_gaga(x0, x1, =_out_ag(x0))) we obtained the following new rules [LPAR04]: (U10_GAAG(x0, =_out_ag(succ(y_1))) -> U11_GAAG(x0, succ(y_1), U6_gaga(succ(y_1), x0, =_out_ag(succ(y_1)))),U10_GAAG(x0, =_out_ag(succ(y_1))) -> U11_GAAG(x0, succ(y_1), U6_gaga(succ(y_1), x0, =_out_ag(succ(y_1))))) ---------------------------------------- (435) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0) U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), move_out_ggaa) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(y_1))) -> U11_GAAG(x0, succ(y_1), U6_gaga(succ(y_1), x0, =_out_ag(succ(y_1)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (436) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U9_GAAG(Z, isMinus_out_gga(U)) -> U10_GAAG(Z, =_out_ag(U)) we obtained the following new rules [LPAR04]: (U9_GAAG(x0, isMinus_out_gga(succ(zero))) -> U10_GAAG(x0, =_out_ag(succ(zero))),U9_GAAG(x0, isMinus_out_gga(succ(zero))) -> U10_GAAG(x0, =_out_ag(succ(zero)))) (U9_GAAG(x0, isMinus_out_gga(succ(y_1))) -> U10_GAAG(x0, =_out_ag(succ(y_1))),U9_GAAG(x0, isMinus_out_gga(succ(y_1))) -> U10_GAAG(x0, =_out_ag(succ(y_1)))) ---------------------------------------- (437) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0) U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), move_out_ggaa) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(y_1))) -> U11_GAAG(x0, succ(y_1), U6_gaga(succ(y_1), x0, =_out_ag(succ(y_1)))) U9_GAAG(x0, isMinus_out_gga(succ(zero))) -> U10_GAAG(x0, =_out_ag(succ(zero))) U9_GAAG(x0, isMinus_out_gga(succ(y_1))) -> U10_GAAG(x0, =_out_ag(succ(y_1))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (438) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U8_GAAG(succ(x0), y1, isGreater_out_gg) -> U9_GAAG(y1, isMinus_out_gga(x0)) we obtained the following new rules [LPAR04]: (U8_GAAG(succ(succ(zero)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(zero))),U8_GAAG(succ(succ(zero)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(zero)))) (U8_GAAG(succ(succ(y_1)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(y_1))),U8_GAAG(succ(succ(y_1)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(y_1)))) ---------------------------------------- (439) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0) U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), move_out_ggaa) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(y_1))) -> U11_GAAG(x0, succ(y_1), U6_gaga(succ(y_1), x0, =_out_ag(succ(y_1)))) U9_GAAG(x0, isMinus_out_gga(succ(zero))) -> U10_GAAG(x0, =_out_ag(succ(zero))) U9_GAAG(x0, isMinus_out_gga(succ(y_1))) -> U10_GAAG(x0, =_out_ag(succ(y_1))) U8_GAAG(succ(succ(zero)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(zero))) U8_GAAG(succ(succ(y_1)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(y_1))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (440) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U7_GAAG(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAAG(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) we obtained the following new rules [LPAR04]: (U7_GAAG(succ(succ(zero)), x1, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(zero)), x1, U47_gg(isGreater_in_gg(succ(zero), zero))),U7_GAAG(succ(succ(zero)), x1, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(zero)), x1, U47_gg(isGreater_in_gg(succ(zero), zero)))) (U7_GAAG(succ(succ(y_0)), x1, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(y_0)), x1, U47_gg(isGreater_in_gg(succ(y_0), zero))),U7_GAAG(succ(succ(y_0)), x1, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(y_0)), x1, U47_gg(isGreater_in_gg(succ(y_0), zero)))) ---------------------------------------- (441) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0) U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), move_out_ggaa) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(y_1))) -> U11_GAAG(x0, succ(y_1), U6_gaga(succ(y_1), x0, =_out_ag(succ(y_1)))) U9_GAAG(x0, isMinus_out_gga(succ(zero))) -> U10_GAAG(x0, =_out_ag(succ(zero))) U9_GAAG(x0, isMinus_out_gga(succ(y_1))) -> U10_GAAG(x0, =_out_ag(succ(y_1))) U8_GAAG(succ(succ(zero)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(zero))) U8_GAAG(succ(succ(y_1)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(y_1))) U7_GAAG(succ(succ(zero)), x1, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(zero)), x1, U47_gg(isGreater_in_gg(succ(zero), zero))) U7_GAAG(succ(succ(y_0)), x1, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(y_0)), x1, U47_gg(isGreater_in_gg(succ(y_0), zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (442) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GAAG(succ(succ(zero)), x1, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(zero)), x1, U47_gg(isGreater_in_gg(succ(zero), zero))) at position [2,0] we obtained the following new rules [LPAR04]: (U7_GAAG(succ(succ(zero)), x1, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(zero)), x1, U47_gg(isGreater_out_gg)),U7_GAAG(succ(succ(zero)), x1, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(zero)), x1, U47_gg(isGreater_out_gg))) ---------------------------------------- (443) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0) U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), move_out_ggaa) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(y_1))) -> U11_GAAG(x0, succ(y_1), U6_gaga(succ(y_1), x0, =_out_ag(succ(y_1)))) U9_GAAG(x0, isMinus_out_gga(succ(zero))) -> U10_GAAG(x0, =_out_ag(succ(zero))) U9_GAAG(x0, isMinus_out_gga(succ(y_1))) -> U10_GAAG(x0, =_out_ag(succ(y_1))) U8_GAAG(succ(succ(zero)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(zero))) U8_GAAG(succ(succ(y_1)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(y_1))) U7_GAAG(succ(succ(y_0)), x1, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(y_0)), x1, U47_gg(isGreater_in_gg(succ(y_0), zero))) U7_GAAG(succ(succ(zero)), x1, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(zero)), x1, U47_gg(isGreater_out_gg)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (444) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GAAG(succ(succ(y_0)), x1, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(y_0)), x1, U47_gg(isGreater_in_gg(succ(y_0), zero))) at position [2,0] we obtained the following new rules [LPAR04]: (U7_GAAG(succ(succ(y_0)), x1, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(y_0)), x1, U47_gg(isGreater_out_gg)),U7_GAAG(succ(succ(y_0)), x1, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(y_0)), x1, U47_gg(isGreater_out_gg))) ---------------------------------------- (445) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0) U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), move_out_ggaa) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(y_1))) -> U11_GAAG(x0, succ(y_1), U6_gaga(succ(y_1), x0, =_out_ag(succ(y_1)))) U9_GAAG(x0, isMinus_out_gga(succ(zero))) -> U10_GAAG(x0, =_out_ag(succ(zero))) U9_GAAG(x0, isMinus_out_gga(succ(y_1))) -> U10_GAAG(x0, =_out_ag(succ(y_1))) U8_GAAG(succ(succ(zero)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(zero))) U8_GAAG(succ(succ(y_1)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(y_1))) U7_GAAG(succ(succ(zero)), x1, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(zero)), x1, U47_gg(isGreater_out_gg)) U7_GAAG(succ(succ(y_0)), x1, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(y_0)), x1, U47_gg(isGreater_out_gg)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (446) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GAAG(succ(succ(zero)), x1, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(zero)), x1, U47_gg(isGreater_out_gg)) at position [2] we obtained the following new rules [LPAR04]: (U7_GAAG(succ(succ(zero)), x1, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(zero)), x1, isGreater_out_gg),U7_GAAG(succ(succ(zero)), x1, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(zero)), x1, isGreater_out_gg)) ---------------------------------------- (447) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0) U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), move_out_ggaa) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(y_1))) -> U11_GAAG(x0, succ(y_1), U6_gaga(succ(y_1), x0, =_out_ag(succ(y_1)))) U9_GAAG(x0, isMinus_out_gga(succ(zero))) -> U10_GAAG(x0, =_out_ag(succ(zero))) U9_GAAG(x0, isMinus_out_gga(succ(y_1))) -> U10_GAAG(x0, =_out_ag(succ(y_1))) U8_GAAG(succ(succ(zero)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(zero))) U8_GAAG(succ(succ(y_1)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(y_1))) U7_GAAG(succ(succ(y_0)), x1, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(y_0)), x1, U47_gg(isGreater_out_gg)) U7_GAAG(succ(succ(zero)), x1, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(zero)), x1, isGreater_out_gg) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (448) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GAAG(succ(succ(y_0)), x1, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(y_0)), x1, U47_gg(isGreater_out_gg)) at position [2] we obtained the following new rules [LPAR04]: (U7_GAAG(succ(succ(y_0)), x1, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(y_0)), x1, isGreater_out_gg),U7_GAAG(succ(succ(y_0)), x1, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(y_0)), x1, isGreater_out_gg)) ---------------------------------------- (449) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0) U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), move_out_ggaa) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(y_1))) -> U11_GAAG(x0, succ(y_1), U6_gaga(succ(y_1), x0, =_out_ag(succ(y_1)))) U9_GAAG(x0, isMinus_out_gga(succ(zero))) -> U10_GAAG(x0, =_out_ag(succ(zero))) U9_GAAG(x0, isMinus_out_gga(succ(y_1))) -> U10_GAAG(x0, =_out_ag(succ(y_1))) U8_GAAG(succ(succ(zero)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(zero))) U8_GAAG(succ(succ(y_1)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(y_1))) U7_GAAG(succ(succ(zero)), x1, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(zero)), x1, isGreater_out_gg) U7_GAAG(succ(succ(y_0)), x1, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(y_0)), x1, isGreater_out_gg) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (450) QDPOrderProof (EQUIVALENT) We use the reduction pair processor [LPAR04,JAR06]. The following pairs can be oriented strictly and are deleted. U10_GAAG(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAGA(succ(y_0), x0) U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAAG(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAAG(succ(y_0), x1) -> U6_GAAG(succ(y_0), x1, =_out_ag(succ(y_0))) U10_GAGA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GAAG(succ(y_0), x0) U12_GAGA(x0, succ(y_0), move_out_gaga) -> MOVE_IN_GAGA(succ(y_0), x0) U12_GAAG(x0, succ(y_0), move_out_gaaa) -> MOVE_IN_GGAA(succ(y_0), x0) U10_GGAA(x0, =_out_ag(succ(y_0))) -> MOVE_IN_GGAA(succ(y_0), x0) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAA(x0, succ(y_1), move_out_ggaa) -> U12_GGAA(x0, succ(y_1), move_out_ggaa) U8_GAAG(succ(succ(zero)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(zero))) U8_GAAG(succ(succ(y_1)), x1, isGreater_out_gg) -> U9_GAAG(x1, isMinus_out_gga(succ(y_1))) U7_GAAG(succ(succ(zero)), x1, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(zero)), x1, isGreater_out_gg) U7_GAAG(succ(succ(y_0)), x1, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAAG(succ(succ(y_0)), x1, isGreater_out_gg) The remaining pairs can at least be oriented weakly. Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation: POL( U11_GAAG_3(x_1, ..., x_3) ) = max{0, x_1 + 2x_2 + 2x_3 - 2} POL( U8_gaag_3(x_1, ..., x_3) ) = 2 POL( U8_gaga_3(x_1, ..., x_3) ) = 2 POL( U8_ggaa_3(x_1, ..., x_3) ) = 2 POL( U11_GAGA_3(x_1, ..., x_3) ) = x_1 + 2x_2 + 2x_3 + 2 POL( U11_GGAA_3(x_1, ..., x_3) ) = x_1 + 2x_2 + 2x_3 + 2 POL( U12_GAAG_3(x_1, ..., x_3) ) = x_1 + 2x_2 + x_3 + 2 POL( U8_gaaa_2(x_1, x_2) ) = max{0, -2} POL( U12_GAGA_3(x_1, ..., x_3) ) = x_1 + 2x_2 + 2x_3 + 2 POL( U12_GGAA_3(x_1, ..., x_3) ) = max{0, x_1 + 2x_2 + x_3 - 1} POL( U47_gg_1(x_1) ) = x_1 POL( U8_GAGA_3(x_1, ..., x_3) ) = x_1 + x_2 + 2x_3 POL( U8_GGAA_3(x_1, ..., x_3) ) = x_1 + x_2 + 2x_3 POL( U12_gaag_3(x_1, ..., x_3) ) = 2 POL( isGreater_in_gg_2(x_1, x_2) ) = max{0, x_1 + 2x_2 - 2} POL( succ_1(x_1) ) = 2x_1 + 2 POL( zero ) = 1 POL( isGreater_out_gg ) = 2 POL( U6_gaag_3(x_1, ..., x_3) ) = 2 POL( =_out_ag_1(x_1) ) = x_1 + 2 POL( U7_gaag_4(x_1, ..., x_4) ) = 2 POL( =_in_ag_1(x_1) ) = max{0, -2} POL( U6_ggaa_3(x_1, ..., x_3) ) = 2 POL( U7_ggaa_4(x_1, ..., x_4) ) = 2 POL( U6_gaga_3(x_1, ..., x_3) ) = 2 POL( U7_gaga_4(x_1, ..., x_4) ) = 2 POL( U6_gaaa_2(x_1, x_2) ) = max{0, -2} POL( U7_gaaa_3(x_1, ..., x_3) ) = max{0, -2} POL( U9_ggaa_2(x_1, x_2) ) = 2 POL( isMinus_in_gga_2(x_1, x_2) ) = max{0, -2} POL( U9_gaag_2(x_1, x_2) ) = 2 POL( U9_gaga_2(x_1, x_2) ) = 2 POL( U9_gaaa_1(x_1) ) = 0 POL( U18_gga_1(x_1) ) = 0 POL( U20_gga_1(x_1) ) = 0 POL( pred_1(x_1) ) = 0 POL( U22_gga_1(x_1) ) = max{0, -2} POL( isMinus_out_gga_1(x_1) ) = x_1 + 2 POL( U10_ggaa_2(x_1, x_2) ) = 2 POL( U10_gaaa_1(x_1) ) = max{0, -2} POL( U10_gaag_2(x_1, x_2) ) = 2 POL( U10_gaga_2(x_1, x_2) ) = 2 POL( U11_ggaa_3(x_1, ..., x_3) ) = 2 POL( move_in_ggaa_2(x_1, x_2) ) = 2 POL( U12_ggaa_3(x_1, ..., x_3) ) = 2 POL( U13_gaag_1(x_1) ) = 2 POL( U1_ggaa_2(x_1, x_2) ) = max{0, 2x_1 - 2} POL( write_in_g_1(x_1) ) = max{0, x_1 - 2} POL( 'Move top disk from ' ) = 0 POL( U48_gg_1(x_1) ) = 1 POL( move_out_ggaa ) = 2 POL( U13_ggaa_1(x_1) ) = max{0, 2x_1 - 2} POL( move_in_gaag_2(x_1, x_2) ) = 2 POL( U11_gaga_3(x_1, ..., x_3) ) = 2 POL( U1_gaag_1(x_1) ) = 2 POL( move_out_gaag ) = 2 POL( U11_gaag_3(x_1, ..., x_3) ) = x_3 POL( move_in_gaga_2(x_1, x_2) ) = 2 POL( U12_gaga_3(x_1, ..., x_3) ) = x_3 POL( U13_gaga_1(x_1) ) = max{0, 2x_1 - 2} POL( U1_gaga_2(x_1, x_2) ) = 2 POL( move_out_gaga ) = 2 POL( move_in_gaaa_1(x_1) ) = max{0, -2} POL( U11_gaaa_2(x_1, x_2) ) = max{0, -2} POL( U12_gaaa_2(x_1, x_2) ) = max{0, 2x_2 - 2} POL( U13_gaaa_1(x_1) ) = max{0, -2} POL( U1_gaaa_1(x_1) ) = max{0, -2} POL( move_out_gaaa ) = 0 POL( U19_gga_1(x_1) ) = 2 POL( U21_gga_1(x_1) ) = 0 POL( U23_gga_1(x_1) ) = 2 POL( U3_gaga_2(x_1, x_2) ) = 2 POL( U4_gaga_1(x_1) ) = 2 POL( U3_gaag_1(x_1) ) = 2 POL( U2_ggaa_1(x_1) ) = max{0, -2} POL( U3_ggaa_1(x_1) ) = max{0, -2} POL( U3_gaaa_1(x_1) ) = max{0, -2} POL( write_out_g ) = 0 POL( U2_gaga_2(x_1, x_2) ) = 2 POL( write_in_a ) = 0 POL( U2_gaaa_1(x_1) ) = max{0, -2} POL( U2_gaag_1(x_1) ) = 2 POL( ' to ' ) = 0 POL( U4_gaag_1(x_1) ) = 2 POL( U4_ggaa_1(x_1) ) = max{0, -2} POL( U4_gaaa_1(x_1) ) = max{0, -2} POL( write_out_a ) = 0 POL( U5_gaga_1(x_1) ) = x_1 POL( nl_in_ ) = 2 POL( U5_ggaa_1(x_1) ) = max{0, -2} POL( U5_gaaa_1(x_1) ) = max{0, -2} POL( U5_gaag_1(x_1) ) = max{0, 2x_1 - 2} POL( nl_out_ ) = 2 POL( U7_GAGA_4(x_1, ..., x_4) ) = max{0, x_1 + x_2 + x_3 - 2} POL( U9_GAGA_2(x_1, x_2) ) = x_1 + 2x_2 + 2 POL( U10_GAGA_2(x_1, x_2) ) = x_1 + 2x_2 + 2 POL( MOVE_IN_GAGA_2(x_1, x_2) ) = max{0, 2x_1 + x_2 - 2} POL( U7_GGAA_4(x_1, ..., x_4) ) = max{0, 2x_1 + x_2 - 2} POL( U9_GGAA_2(x_1, x_2) ) = x_1 + 2x_2 + 2 POL( U10_GGAA_2(x_1, x_2) ) = x_1 + 2x_2 + 2 POL( MOVE_IN_GGAA_2(x_1, x_2) ) = max{0, 2x_1 + x_2 - 2} POL( U10_GAAG_2(x_1, x_2) ) = max{0, x_1 + 2x_2 - 2} POL( U6_GAGA_3(x_1, ..., x_3) ) = max{0, 2x_1 + x_2 - 2} POL( U6_GAAG_3(x_1, ..., x_3) ) = max{0, x_1 + x_2 + x_3 - 2} POL( U7_GAAG_4(x_1, ..., x_4) ) = max{0, 2x_1 + x_2 - 2} POL( MOVE_IN_GAAG_2(x_1, x_2) ) = 2x_1 + x_2 + 1 POL( U6_GGAA_3(x_1, ..., x_3) ) = max{0, 2x_1 + x_2 - 2} POL( U9_GAAG_2(x_1, x_2) ) = max{0, x_1 + 2x_2 - 2} POL( U8_GAAG_3(x_1, ..., x_3) ) = x_1 + x_2 + 1 The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U13_ggaa(move_out_gaag) -> move_out_ggaa move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U4_gaag(write_out_a) -> U5_gaag(nl_in_) nl_in_ -> nl_out_ U5_gaga(nl_out_) -> move_out_gaga U5_gaaa(nl_out_) -> move_out_gaaa U5_gaag(nl_out_) -> move_out_gaag ---------------------------------------- (451) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) U10_GAAG(x0, =_out_ag(succ(zero))) -> U11_GAAG(x0, succ(zero), move_out_gaga) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U11_GAGA(x0, succ(y_1), move_out_gaag) -> U12_GAGA(x0, succ(y_1), move_out_gaga) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), U6_gaaa(succ(zero), =_out_ag(succ(zero)))) U12_GGAA(x0, succ(y_0), move_out_ggaa) -> MOVE_IN_GAAG(succ(y_0), x0) U11_GAAG(x0, succ(y_1), move_out_gaga) -> U12_GAAG(x0, succ(y_1), move_out_gaaa) U10_GAAG(x0, =_out_ag(succ(y_1))) -> U11_GAAG(x0, succ(y_1), U6_gaga(succ(y_1), x0, =_out_ag(succ(y_1)))) U9_GAAG(x0, isMinus_out_gga(succ(zero))) -> U10_GAAG(x0, =_out_ag(succ(zero))) U9_GAAG(x0, isMinus_out_gga(succ(y_1))) -> U10_GAAG(x0, =_out_ag(succ(y_1))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (452) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs with 9 less nodes. ---------------------------------------- (453) Complex Obligation (AND) ---------------------------------------- (454) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (455) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule MOVE_IN_GGAA(succ(y_0), x1) -> U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) we obtained the following new rules [LPAR04]: (MOVE_IN_GGAA(succ(zero), z0) -> U6_GGAA(succ(zero), z0, =_out_ag(succ(zero))),MOVE_IN_GGAA(succ(zero), z0) -> U6_GGAA(succ(zero), z0, =_out_ag(succ(zero)))) ---------------------------------------- (456) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) MOVE_IN_GGAA(succ(zero), z0) -> U6_GGAA(succ(zero), z0, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (457) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U6_GGAA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GGAA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GGAA(succ(zero), z0, =_out_ag(succ(zero))) -> U7_GGAA(succ(zero), z0, succ(zero), =_out_ag(succ(zero))),U6_GGAA(succ(zero), z0, =_out_ag(succ(zero))) -> U7_GGAA(succ(zero), z0, succ(zero), =_out_ag(succ(zero)))) ---------------------------------------- (458) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) MOVE_IN_GGAA(succ(zero), z0) -> U6_GGAA(succ(zero), z0, =_out_ag(succ(zero))) U6_GGAA(succ(zero), z0, =_out_ag(succ(zero))) -> U7_GGAA(succ(zero), z0, succ(zero), =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (459) TransformationProof (SOUND) By narrowing [LPAR04] the rule U7_GGAA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GGAA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) at position [2,0] we obtained the following new rules [LPAR04]: (U7_GGAA(succ(succ(x0)), y1, succ(succ(x0)), =_out_ag(succ(zero))) -> U8_GGAA(succ(succ(x0)), y1, U47_gg(isGreater_out_gg)),U7_GGAA(succ(succ(x0)), y1, succ(succ(x0)), =_out_ag(succ(zero))) -> U8_GGAA(succ(succ(x0)), y1, U47_gg(isGreater_out_gg))) ---------------------------------------- (460) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGAA(succ(x0), y1, isGreater_out_gg) -> U9_GGAA(y1, isMinus_out_gga(x0)) U9_GGAA(X, isMinus_out_gga(U)) -> U10_GGAA(X, =_out_ag(U)) U10_GGAA(x1, =_out_ag(x0)) -> U11_GGAA(x1, x0, U6_ggaa(x0, x1, =_out_ag(x0))) U11_GGAA(X, M, move_out_ggaa) -> MOVE_IN_GGAA(succ(zero), X) U10_GGAA(x0, =_out_ag(succ(zero))) -> U11_GGAA(x0, succ(zero), move_out_ggaa) MOVE_IN_GGAA(succ(zero), z0) -> U6_GGAA(succ(zero), z0, =_out_ag(succ(zero))) U6_GGAA(succ(zero), z0, =_out_ag(succ(zero))) -> U7_GGAA(succ(zero), z0, succ(zero), =_out_ag(succ(zero))) U7_GGAA(succ(succ(x0)), y1, succ(succ(x0)), =_out_ag(succ(zero))) -> U8_GGAA(succ(succ(x0)), y1, U47_gg(isGreater_out_gg)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (461) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 8 less nodes. ---------------------------------------- (462) TRUE ---------------------------------------- (463) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (464) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule MOVE_IN_GAGA(succ(y_0), x1) -> U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) we obtained the following new rules [LPAR04]: (MOVE_IN_GAGA(succ(zero), z0) -> U6_GAGA(succ(zero), z0, =_out_ag(succ(zero))),MOVE_IN_GAGA(succ(zero), z0) -> U6_GAGA(succ(zero), z0, =_out_ag(succ(zero)))) ---------------------------------------- (465) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) MOVE_IN_GAGA(succ(zero), z0) -> U6_GAGA(succ(zero), z0, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (466) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U6_GAGA(succ(y_0), x1, =_out_ag(succ(y_0))) -> U7_GAGA(succ(y_0), x1, succ(y_0), =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GAGA(succ(zero), z0, =_out_ag(succ(zero))) -> U7_GAGA(succ(zero), z0, succ(zero), =_out_ag(succ(zero))),U6_GAGA(succ(zero), z0, =_out_ag(succ(zero))) -> U7_GAGA(succ(zero), z0, succ(zero), =_out_ag(succ(zero)))) ---------------------------------------- (467) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) MOVE_IN_GAGA(succ(zero), z0) -> U6_GAGA(succ(zero), z0, =_out_ag(succ(zero))) U6_GAGA(succ(zero), z0, =_out_ag(succ(zero))) -> U7_GAGA(succ(zero), z0, succ(zero), =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (468) TransformationProof (SOUND) By narrowing [LPAR04] the rule U7_GAGA(succ(x0), y1, succ(x0), =_out_ag(succ(zero))) -> U8_GAGA(succ(x0), y1, U47_gg(isGreater_in_gg(x0, zero))) at position [2,0] we obtained the following new rules [LPAR04]: (U7_GAGA(succ(succ(x0)), y1, succ(succ(x0)), =_out_ag(succ(zero))) -> U8_GAGA(succ(succ(x0)), y1, U47_gg(isGreater_out_gg)),U7_GAGA(succ(succ(x0)), y1, succ(succ(x0)), =_out_ag(succ(zero))) -> U8_GAGA(succ(succ(x0)), y1, U47_gg(isGreater_out_gg))) ---------------------------------------- (469) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GAGA(succ(x0), y1, isGreater_out_gg) -> U9_GAGA(y1, isMinus_out_gga(x0)) U9_GAGA(Y, isMinus_out_gga(U)) -> U10_GAGA(Y, =_out_ag(U)) U10_GAGA(x1, =_out_ag(x0)) -> U11_GAGA(x1, x0, U6_gaag(x0, x1, =_out_ag(x0))) U11_GAGA(Y, M, move_out_gaag) -> MOVE_IN_GAGA(succ(zero), Y) U10_GAGA(x0, =_out_ag(succ(zero))) -> U11_GAGA(x0, succ(zero), move_out_gaag) MOVE_IN_GAGA(succ(zero), z0) -> U6_GAGA(succ(zero), z0, =_out_ag(succ(zero))) U6_GAGA(succ(zero), z0, =_out_ag(succ(zero))) -> U7_GAGA(succ(zero), z0, succ(zero), =_out_ag(succ(zero))) U7_GAGA(succ(succ(x0)), y1, succ(succ(x0)), =_out_ag(succ(zero))) -> U8_GAGA(succ(succ(x0)), y1, U47_gg(isGreater_out_gg)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) nl_in_ -> nl_out_ U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_ggaa(move_out_gaag) -> move_out_ggaa U13_gaga(move_out_gaga) -> move_out_gaga U13_gaaa(move_out_gaaa) -> move_out_gaaa U13_gaag(move_out_ggaa) -> move_out_gaag The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggaa(x0, x1) move_in_gaga(x0, x1) move_in_gaaa(x0) move_in_gaag(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_gaaa(x0) U6_gaaa(x0, x1) U1_gaag(x0) U6_gaag(x0, x1, x2) write_in_g(x0) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggaa(x0) U8_ggaa(x0, x1, x2) write_in_a U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_ggaa(x0) U9_ggaa(x0, x1) U4_gaga(x0) U9_gaga(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U4_gaag(x0) U9_gaag(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) U5_gaga(x0) U10_gaga(x0, x1) U5_gaaa(x0) U10_gaaa(x0) U5_gaag(x0) U10_gaag(x0, x1) nl_in_ U11_ggaa(x0, x1, x2) U11_gaga(x0, x1, x2) U11_gaaa(x0, x1) U11_gaag(x0, x1, x2) U12_ggaa(x0, x1, x2) U12_gaga(x0, x1, x2) U12_gaaa(x0, x1) U12_gaag(x0, x1, x2) U13_ggaa(x0) U13_gaga(x0) U13_gaaa(x0) U13_gaag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (470) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 8 less nodes. ---------------------------------------- (471) TRUE ---------------------------------------- (472) Obligation: Pi DP problem: The TRS P consists of the following rules: U7_GGGA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGGA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GGGA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGGA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GGGA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGGA(N, X, Y, Z, =_in_ag(M, U)) U10_GGGA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGGA(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) U11_GGGA(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_GGGA(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U12_GGGA(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> MOVE_IN_GAGG(M, Z, Y, X) MOVE_IN_GAGG(N, X, Y, Z) -> U6_GAGG(N, X, Y, Z, =_in_ag(X1, N)) U6_GAGG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAGG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_GAGG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAGG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GAGG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAGG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GAGG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAGG(N, X, Y, Z, =_in_ag(M, U)) U10_GAGG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAGG(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U11_GAGG(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_GAGG(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_GAGG(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> MOVE_IN_GGGA(M, Z, Y, X) MOVE_IN_GGGA(N, X, Y, Z) -> U6_GGGA(N, X, Y, Z, =_in_ag(X1, N)) U6_GGGA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGGA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U10_GAGG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAGG(M, X, Z, Y) U11_GGGA(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> MOVE_IN_GGGA(succ(zero), X, Y, X2) U10_GGGA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGAG(M, X, Z, Y) MOVE_IN_GGAG(N, X, Y, Z) -> U6_GGAG(N, X, Y, Z, =_in_ag(X1, N)) U6_GGAG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGAG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_GGAG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGAG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GGAG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGAG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GGAG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGAG(N, X, Y, Z, =_in_ag(M, U)) U10_GGAG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGAG(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U11_GGAG(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_GGAG(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_GGAG(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> MOVE_IN_GGAG(M, Z, Y, X) U10_GGAG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGGA(M, X, Z, Y) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, X1, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g(X0) U1_gggg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gggg(X, Y, X1, write_in_g(X)) U2_gggg(X, Y, X1, write_out_g(X)) -> U3_gggg(X, Y, X1, write_in_g(' to ')) U3_gggg(X, Y, X1, write_out_g(' to ')) -> U4_gggg(X, Y, X1, write_in_g(Y)) U4_gggg(X, Y, X1, write_out_g(Y)) -> U5_gggg(X, Y, X1, nl_in_) nl_in_ -> nl_out_ U5_gggg(X, Y, X1, nl_out_) -> move_out_gggg(succ(zero), X, Y, X1) move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(X1, N)) =_in_ag(X, X) -> =_out_ag(X, X) U6_gggg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gggg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg(succ(X), zero) isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg(succ(X), pred(Y)) isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(X, Y, isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg(zero, pred(Y)) isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(X, Y, isGreater_in_gg(X, Y)) U48_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U47_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U8_gggg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gggg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) isMinus_in_gga(X, zero, X) -> isMinus_out_gga(X, zero, X) isMinus_in_gga(zero, succ(Y), pred(Z)) -> U18_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(zero, pred(Y), succ(Z)) -> U19_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), succ(Y), Z) -> U20_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(succ(X), pred(Y), succ(succ(Z))) -> U21_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), succ(Y), pred(pred(Z))) -> U22_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), pred(Y), Z) -> U23_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) U23_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), pred(Y), Z) U22_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), succ(Y), pred(pred(Z))) U21_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), pred(Y), succ(succ(Z))) U20_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), succ(Y), Z) U19_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, pred(Y), succ(Z)) U18_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, succ(Y), pred(Z)) U9_gggg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gggg(N, X, Y, Z, =_in_ag(M, U)) U10_gggg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gggg(N, X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> U12_gggg(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) move_in_ggga(succ(zero), X, Y, X1) -> U1_ggga(X, Y, X1, write_in_g('Move top disk from ')) U1_ggga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggga(X, Y, X1, write_in_g(X)) U2_ggga(X, Y, X1, write_out_g(X)) -> U3_ggga(X, Y, X1, write_in_g(' to ')) U3_ggga(X, Y, X1, write_out_g(' to ')) -> U4_ggga(X, Y, X1, write_in_g(Y)) U4_ggga(X, Y, X1, write_out_g(Y)) -> U5_ggga(X, Y, X1, nl_in_) U5_ggga(X, Y, X1, nl_out_) -> move_out_ggga(succ(zero), X, Y, X1) move_in_ggga(N, X, Y, Z) -> U6_ggga(N, X, Y, Z, =_in_ag(X1, N)) U6_ggga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggga(N, X, Y, Z, =_in_ag(M, U)) U10_ggga(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggga(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) move_in_ggag(succ(zero), X, Y, X1) -> U1_ggag(X, Y, X1, write_in_g('Move top disk from ')) U1_ggag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggag(X, Y, X1, write_in_g(X)) U2_ggag(X, Y, X1, write_out_g(X)) -> U3_ggag(X, Y, X1, write_in_g(' to ')) U3_ggag(X, Y, X1, write_out_g(' to ')) -> U4_ggag(X, Y, X1, write_in_a(Y)) write_in_a(X0) -> write_out_a(X0) U4_ggag(X, Y, X1, write_out_a(Y)) -> U5_ggag(X, Y, X1, nl_in_) U5_ggag(X, Y, X1, nl_out_) -> move_out_ggag(succ(zero), X, Y, X1) move_in_ggag(N, X, Y, Z) -> U6_ggag(N, X, Y, Z, =_in_ag(X1, N)) U6_ggag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggag(N, X, Y, Z, =_in_ag(M, U)) U10_ggag(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggag(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U11_ggag(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_ggag(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) move_in_ggaa(succ(zero), X, Y, X1) -> U1_ggaa(X, Y, X1, write_in_g('Move top disk from ')) U1_ggaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggaa(X, Y, X1, write_in_g(X)) U2_ggaa(X, Y, X1, write_out_g(X)) -> U3_ggaa(X, Y, X1, write_in_g(' to ')) U3_ggaa(X, Y, X1, write_out_g(' to ')) -> U4_ggaa(X, Y, X1, write_in_a(Y)) U4_ggaa(X, Y, X1, write_out_a(Y)) -> U5_ggaa(X, Y, X1, nl_in_) U5_ggaa(X, Y, X1, nl_out_) -> move_out_ggaa(succ(zero), X, Y, X1) move_in_ggaa(N, X, Y, Z) -> U6_ggaa(N, X, Y, Z, =_in_ag(X1, N)) U6_ggaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggaa(N, X, Y, Z, =_in_ag(M, U)) U10_ggaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggaa(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U11_ggaa(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_ggaa(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_ggaa(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggaa(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) move_in_gaag(succ(zero), X, Y, X1) -> U1_gaag(X, Y, X1, write_in_g('Move top disk from ')) U1_gaag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaag(X, Y, X1, write_in_a(X)) U2_gaag(X, Y, X1, write_out_a(X)) -> U3_gaag(X, Y, X1, write_in_g(' to ')) U3_gaag(X, Y, X1, write_out_g(' to ')) -> U4_gaag(X, Y, X1, write_in_a(Y)) U4_gaag(X, Y, X1, write_out_a(Y)) -> U5_gaag(X, Y, X1, nl_in_) U5_gaag(X, Y, X1, nl_out_) -> move_out_gaag(succ(zero), X, Y, X1) move_in_gaag(N, X, Y, Z) -> U6_gaag(N, X, Y, Z, =_in_ag(X1, N)) U6_gaag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaag(N, X, Y, Z, =_in_ag(M, U)) U10_gaag(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaag(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) move_in_gaga(succ(zero), X, Y, X1) -> U1_gaga(X, Y, X1, write_in_g('Move top disk from ')) U1_gaga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaga(X, Y, X1, write_in_a(X)) U2_gaga(X, Y, X1, write_out_a(X)) -> U3_gaga(X, Y, X1, write_in_g(' to ')) U3_gaga(X, Y, X1, write_out_g(' to ')) -> U4_gaga(X, Y, X1, write_in_g(Y)) U4_gaga(X, Y, X1, write_out_g(Y)) -> U5_gaga(X, Y, X1, nl_in_) U5_gaga(X, Y, X1, nl_out_) -> move_out_gaga(succ(zero), X, Y, X1) move_in_gaga(N, X, Y, Z) -> U6_gaga(N, X, Y, Z, =_in_ag(X1, N)) U6_gaga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaga(N, X, Y, Z, =_in_ag(M, U)) U10_gaga(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaga(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U11_gaga(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_gaga(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gaga(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gaga(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U13_gaga(N, X, Y, Z, move_out_gaga(M, Z, Y, X)) -> move_out_gaga(N, X, Y, Z) U11_gaag(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_gaag(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) move_in_gaaa(succ(zero), X, Y, X1) -> U1_gaaa(X, Y, X1, write_in_g('Move top disk from ')) U1_gaaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaaa(X, Y, X1, write_in_a(X)) U2_gaaa(X, Y, X1, write_out_a(X)) -> U3_gaaa(X, Y, X1, write_in_g(' to ')) U3_gaaa(X, Y, X1, write_out_g(' to ')) -> U4_gaaa(X, Y, X1, write_in_a(Y)) U4_gaaa(X, Y, X1, write_out_a(Y)) -> U5_gaaa(X, Y, X1, nl_in_) U5_gaaa(X, Y, X1, nl_out_) -> move_out_gaaa(succ(zero), X, Y, X1) move_in_gaaa(N, X, Y, Z) -> U6_gaaa(N, X, Y, Z, =_in_ag(X1, N)) U6_gaaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaaa(N, X, Y, Z, =_in_ag(M, U)) U10_gaaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaaa(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U11_gaaa(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_gaaa(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_gaaa(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaaa(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U13_gaaa(N, X, Y, Z, move_out_gaaa(M, Z, Y, X)) -> move_out_gaaa(N, X, Y, Z) U12_gaag(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaag(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) U13_gaag(N, X, Y, Z, move_out_ggaa(M, Z, Y, X)) -> move_out_gaag(N, X, Y, Z) U13_ggaa(N, X, Y, Z, move_out_gaag(M, Z, Y, X)) -> move_out_ggaa(N, X, Y, Z) U12_ggag(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggag(N, X, Y, Z, move_in_ggag(M, Z, Y, X)) U13_ggag(N, X, Y, Z, move_out_ggag(M, Z, Y, X)) -> move_out_ggag(N, X, Y, Z) U11_ggga(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_ggga(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U12_ggga(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_ggga(N, X, Y, Z, move_in_gagg(M, Z, Y, X)) move_in_gagg(succ(zero), X, Y, X1) -> U1_gagg(X, Y, X1, write_in_g('Move top disk from ')) U1_gagg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gagg(X, Y, X1, write_in_a(X)) U2_gagg(X, Y, X1, write_out_a(X)) -> U3_gagg(X, Y, X1, write_in_g(' to ')) U3_gagg(X, Y, X1, write_out_g(' to ')) -> U4_gagg(X, Y, X1, write_in_g(Y)) U4_gagg(X, Y, X1, write_out_g(Y)) -> U5_gagg(X, Y, X1, nl_in_) U5_gagg(X, Y, X1, nl_out_) -> move_out_gagg(succ(zero), X, Y, X1) move_in_gagg(N, X, Y, Z) -> U6_gagg(N, X, Y, Z, =_in_ag(X1, N)) U6_gagg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gagg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gagg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gagg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gagg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gagg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gagg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gagg(N, X, Y, Z, =_in_ag(M, U)) U10_gagg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gagg(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U11_gagg(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_gagg(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gagg(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gagg(N, X, Y, Z, move_in_ggga(M, Z, Y, X)) U13_gagg(N, X, Y, Z, move_out_ggga(M, Z, Y, X)) -> move_out_gagg(N, X, Y, Z) U13_ggga(N, X, Y, Z, move_out_gagg(M, Z, Y, X)) -> move_out_ggga(N, X, Y, Z) U12_gggg(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_gggg(N, X, Y, Z, move_in_gggg(M, Z, Y, X)) U13_gggg(N, X, Y, Z, move_out_gggg(M, Z, Y, X)) -> move_out_gggg(N, X, Y, Z) The argument filtering Pi contains the following mapping: move_in_gggg(x1, x2, x3, x4) = move_in_gggg(x1, x2, x3, x4) succ(x1) = succ(x1) zero = zero U1_gggg(x1, x2, x3, x4) = U1_gggg(x1, x2, x4) write_in_g(x1) = write_in_g(x1) write_out_g(x1) = write_out_g 'Move top disk from ' = 'Move top disk from ' U2_gggg(x1, x2, x3, x4) = U2_gggg(x2, x4) U3_gggg(x1, x2, x3, x4) = U3_gggg(x2, x4) ' to ' = ' to ' U4_gggg(x1, x2, x3, x4) = U4_gggg(x4) U5_gggg(x1, x2, x3, x4) = U5_gggg(x4) nl_in_ = nl_in_ nl_out_ = nl_out_ move_out_gggg(x1, x2, x3, x4) = move_out_gggg U6_gggg(x1, x2, x3, x4, x5) = U6_gggg(x1, x2, x3, x4, x5) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U7_gggg(x1, x2, x3, x4, x5, x6) = U7_gggg(x1, x2, x3, x4, x5, x6) U8_gggg(x1, x2, x3, x4, x5, x6, x7) = U8_gggg(x1, x2, x3, x4, x7) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U47_gg(x1, x2, x3) = U47_gg(x3) U48_gg(x1, x2, x3) = U48_gg(x3) U9_gggg(x1, x2, x3, x4, x5) = U9_gggg(x2, x3, x4, x5) isMinus_in_gga(x1, x2, x3) = isMinus_in_gga(x1, x2) isMinus_out_gga(x1, x2, x3) = isMinus_out_gga(x3) U18_gga(x1, x2, x3) = U18_gga(x3) U19_gga(x1, x2, x3) = U19_gga(x3) U20_gga(x1, x2, x3, x4) = U20_gga(x4) U21_gga(x1, x2, x3, x4) = U21_gga(x4) U22_gga(x1, x2, x3, x4) = U22_gga(x4) U23_gga(x1, x2, x3, x4) = U23_gga(x4) U10_gggg(x1, x2, x3, x4, x5) = U10_gggg(x2, x3, x4, x5) U11_gggg(x1, x2, x3, x4, x5, x6) = U11_gggg(x2, x3, x4, x5, x6) U12_gggg(x1, x2, x3, x4, x5, x6) = U12_gggg(x2, x3, x4, x5, x6) move_in_ggga(x1, x2, x3, x4) = move_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4) = U1_ggga(x1, x2, x4) U2_ggga(x1, x2, x3, x4) = U2_ggga(x2, x4) U3_ggga(x1, x2, x3, x4) = U3_ggga(x2, x4) U4_ggga(x1, x2, x3, x4) = U4_ggga(x4) U5_ggga(x1, x2, x3, x4) = U5_ggga(x4) move_out_ggga(x1, x2, x3, x4) = move_out_ggga U6_ggga(x1, x2, x3, x4, x5) = U6_ggga(x1, x2, x3, x5) U7_ggga(x1, x2, x3, x4, x5, x6) = U7_ggga(x1, x2, x3, x5, x6) U8_ggga(x1, x2, x3, x4, x5, x6, x7) = U8_ggga(x1, x2, x3, x7) U9_ggga(x1, x2, x3, x4, x5) = U9_ggga(x2, x3, x5) U10_ggga(x1, x2, x3, x4, x5) = U10_ggga(x2, x3, x5) U11_ggga(x1, x2, x3, x4, x5, x6) = U11_ggga(x2, x3, x5, x6) move_in_ggag(x1, x2, x3, x4) = move_in_ggag(x1, x2, x4) U1_ggag(x1, x2, x3, x4) = U1_ggag(x1, x4) U2_ggag(x1, x2, x3, x4) = U2_ggag(x4) U3_ggag(x1, x2, x3, x4) = U3_ggag(x4) U4_ggag(x1, x2, x3, x4) = U4_ggag(x4) write_in_a(x1) = write_in_a write_out_a(x1) = write_out_a U5_ggag(x1, x2, x3, x4) = U5_ggag(x4) move_out_ggag(x1, x2, x3, x4) = move_out_ggag U6_ggag(x1, x2, x3, x4, x5) = U6_ggag(x1, x2, x4, x5) U7_ggag(x1, x2, x3, x4, x5, x6) = U7_ggag(x1, x2, x4, x5, x6) U8_ggag(x1, x2, x3, x4, x5, x6, x7) = U8_ggag(x1, x2, x4, x7) U9_ggag(x1, x2, x3, x4, x5) = U9_ggag(x2, x4, x5) U10_ggag(x1, x2, x3, x4, x5) = U10_ggag(x2, x4, x5) U11_ggag(x1, x2, x3, x4, x5, x6) = U11_ggag(x2, x4, x5, x6) U12_ggag(x1, x2, x3, x4, x5, x6) = U12_ggag(x2, x4, x5, x6) move_in_ggaa(x1, x2, x3, x4) = move_in_ggaa(x1, x2) U1_ggaa(x1, x2, x3, x4) = U1_ggaa(x1, x4) U2_ggaa(x1, x2, x3, x4) = U2_ggaa(x4) U3_ggaa(x1, x2, x3, x4) = U3_ggaa(x4) U4_ggaa(x1, x2, x3, x4) = U4_ggaa(x4) U5_ggaa(x1, x2, x3, x4) = U5_ggaa(x4) move_out_ggaa(x1, x2, x3, x4) = move_out_ggaa U6_ggaa(x1, x2, x3, x4, x5) = U6_ggaa(x1, x2, x5) U7_ggaa(x1, x2, x3, x4, x5, x6) = U7_ggaa(x1, x2, x5, x6) U8_ggaa(x1, x2, x3, x4, x5, x6, x7) = U8_ggaa(x1, x2, x7) U9_ggaa(x1, x2, x3, x4, x5) = U9_ggaa(x2, x5) U10_ggaa(x1, x2, x3, x4, x5) = U10_ggaa(x2, x5) U11_ggaa(x1, x2, x3, x4, x5, x6) = U11_ggaa(x2, x5, x6) U12_ggaa(x1, x2, x3, x4, x5, x6) = U12_ggaa(x2, x5, x6) U13_ggaa(x1, x2, x3, x4, x5) = U13_ggaa(x5) move_in_gaag(x1, x2, x3, x4) = move_in_gaag(x1, x4) U1_gaag(x1, x2, x3, x4) = U1_gaag(x4) U2_gaag(x1, x2, x3, x4) = U2_gaag(x4) U3_gaag(x1, x2, x3, x4) = U3_gaag(x4) U4_gaag(x1, x2, x3, x4) = U4_gaag(x4) U5_gaag(x1, x2, x3, x4) = U5_gaag(x4) move_out_gaag(x1, x2, x3, x4) = move_out_gaag U6_gaag(x1, x2, x3, x4, x5) = U6_gaag(x1, x4, x5) U7_gaag(x1, x2, x3, x4, x5, x6) = U7_gaag(x1, x4, x5, x6) U8_gaag(x1, x2, x3, x4, x5, x6, x7) = U8_gaag(x1, x4, x7) U9_gaag(x1, x2, x3, x4, x5) = U9_gaag(x4, x5) U10_gaag(x1, x2, x3, x4, x5) = U10_gaag(x4, x5) U11_gaag(x1, x2, x3, x4, x5, x6) = U11_gaag(x4, x5, x6) move_in_gaga(x1, x2, x3, x4) = move_in_gaga(x1, x3) U1_gaga(x1, x2, x3, x4) = U1_gaga(x2, x4) U2_gaga(x1, x2, x3, x4) = U2_gaga(x2, x4) U3_gaga(x1, x2, x3, x4) = U3_gaga(x2, x4) U4_gaga(x1, x2, x3, x4) = U4_gaga(x4) U5_gaga(x1, x2, x3, x4) = U5_gaga(x4) move_out_gaga(x1, x2, x3, x4) = move_out_gaga U6_gaga(x1, x2, x3, x4, x5) = U6_gaga(x1, x3, x5) U7_gaga(x1, x2, x3, x4, x5, x6) = U7_gaga(x1, x3, x5, x6) U8_gaga(x1, x2, x3, x4, x5, x6, x7) = U8_gaga(x1, x3, x7) U9_gaga(x1, x2, x3, x4, x5) = U9_gaga(x3, x5) U10_gaga(x1, x2, x3, x4, x5) = U10_gaga(x3, x5) U11_gaga(x1, x2, x3, x4, x5, x6) = U11_gaga(x3, x5, x6) U12_gaga(x1, x2, x3, x4, x5, x6) = U12_gaga(x3, x5, x6) U13_gaga(x1, x2, x3, x4, x5) = U13_gaga(x5) U12_gaag(x1, x2, x3, x4, x5, x6) = U12_gaag(x4, x5, x6) move_in_gaaa(x1, x2, x3, x4) = move_in_gaaa(x1) U1_gaaa(x1, x2, x3, x4) = U1_gaaa(x4) U2_gaaa(x1, x2, x3, x4) = U2_gaaa(x4) U3_gaaa(x1, x2, x3, x4) = U3_gaaa(x4) U4_gaaa(x1, x2, x3, x4) = U4_gaaa(x4) U5_gaaa(x1, x2, x3, x4) = U5_gaaa(x4) move_out_gaaa(x1, x2, x3, x4) = move_out_gaaa U6_gaaa(x1, x2, x3, x4, x5) = U6_gaaa(x1, x5) U7_gaaa(x1, x2, x3, x4, x5, x6) = U7_gaaa(x1, x5, x6) U8_gaaa(x1, x2, x3, x4, x5, x6, x7) = U8_gaaa(x1, x7) U9_gaaa(x1, x2, x3, x4, x5) = U9_gaaa(x5) U10_gaaa(x1, x2, x3, x4, x5) = U10_gaaa(x5) U11_gaaa(x1, x2, x3, x4, x5, x6) = U11_gaaa(x5, x6) U12_gaaa(x1, x2, x3, x4, x5, x6) = U12_gaaa(x5, x6) U13_gaaa(x1, x2, x3, x4, x5) = U13_gaaa(x5) U13_gaag(x1, x2, x3, x4, x5) = U13_gaag(x5) U13_ggag(x1, x2, x3, x4, x5) = U13_ggag(x5) U12_ggga(x1, x2, x3, x4, x5, x6) = U12_ggga(x2, x3, x5, x6) U13_ggga(x1, x2, x3, x4, x5) = U13_ggga(x5) move_in_gagg(x1, x2, x3, x4) = move_in_gagg(x1, x3, x4) U1_gagg(x1, x2, x3, x4) = U1_gagg(x2, x4) U2_gagg(x1, x2, x3, x4) = U2_gagg(x2, x4) U3_gagg(x1, x2, x3, x4) = U3_gagg(x2, x4) U4_gagg(x1, x2, x3, x4) = U4_gagg(x4) U5_gagg(x1, x2, x3, x4) = U5_gagg(x4) move_out_gagg(x1, x2, x3, x4) = move_out_gagg U6_gagg(x1, x2, x3, x4, x5) = U6_gagg(x1, x3, x4, x5) U7_gagg(x1, x2, x3, x4, x5, x6) = U7_gagg(x1, x3, x4, x5, x6) U8_gagg(x1, x2, x3, x4, x5, x6, x7) = U8_gagg(x1, x3, x4, x7) U9_gagg(x1, x2, x3, x4, x5) = U9_gagg(x3, x4, x5) U10_gagg(x1, x2, x3, x4, x5) = U10_gagg(x3, x4, x5) U11_gagg(x1, x2, x3, x4, x5, x6) = U11_gagg(x3, x4, x5, x6) U12_gagg(x1, x2, x3, x4, x5, x6) = U12_gagg(x3, x4, x5, x6) U13_gagg(x1, x2, x3, x4, x5) = U13_gagg(x5) U13_gggg(x1, x2, x3, x4, x5) = U13_gggg(x5) MOVE_IN_GGGA(x1, x2, x3, x4) = MOVE_IN_GGGA(x1, x2, x3) U6_GGGA(x1, x2, x3, x4, x5) = U6_GGGA(x1, x2, x3, x5) U7_GGGA(x1, x2, x3, x4, x5, x6) = U7_GGGA(x1, x2, x3, x5, x6) U8_GGGA(x1, x2, x3, x4, x5, x6, x7) = U8_GGGA(x1, x2, x3, x7) U9_GGGA(x1, x2, x3, x4, x5) = U9_GGGA(x2, x3, x5) U10_GGGA(x1, x2, x3, x4, x5) = U10_GGGA(x2, x3, x5) U11_GGGA(x1, x2, x3, x4, x5, x6) = U11_GGGA(x2, x3, x5, x6) MOVE_IN_GGAG(x1, x2, x3, x4) = MOVE_IN_GGAG(x1, x2, x4) U6_GGAG(x1, x2, x3, x4, x5) = U6_GGAG(x1, x2, x4, x5) U7_GGAG(x1, x2, x3, x4, x5, x6) = U7_GGAG(x1, x2, x4, x5, x6) U8_GGAG(x1, x2, x3, x4, x5, x6, x7) = U8_GGAG(x1, x2, x4, x7) U9_GGAG(x1, x2, x3, x4, x5) = U9_GGAG(x2, x4, x5) U10_GGAG(x1, x2, x3, x4, x5) = U10_GGAG(x2, x4, x5) U11_GGAG(x1, x2, x3, x4, x5, x6) = U11_GGAG(x2, x4, x5, x6) U12_GGAG(x1, x2, x3, x4, x5, x6) = U12_GGAG(x2, x4, x5, x6) U12_GGGA(x1, x2, x3, x4, x5, x6) = U12_GGGA(x2, x3, x5, x6) MOVE_IN_GAGG(x1, x2, x3, x4) = MOVE_IN_GAGG(x1, x3, x4) U6_GAGG(x1, x2, x3, x4, x5) = U6_GAGG(x1, x3, x4, x5) U7_GAGG(x1, x2, x3, x4, x5, x6) = U7_GAGG(x1, x3, x4, x5, x6) U8_GAGG(x1, x2, x3, x4, x5, x6, x7) = U8_GAGG(x1, x3, x4, x7) U9_GAGG(x1, x2, x3, x4, x5) = U9_GAGG(x3, x4, x5) U10_GAGG(x1, x2, x3, x4, x5) = U10_GAGG(x3, x4, x5) U11_GAGG(x1, x2, x3, x4, x5, x6) = U11_GAGG(x3, x4, x5, x6) U12_GAGG(x1, x2, x3, x4, x5, x6) = U12_GAGG(x3, x4, x5, x6) We have to consider all (P,R,Pi)-chains ---------------------------------------- (473) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (474) Obligation: Pi DP problem: The TRS P consists of the following rules: U7_GGGA(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGGA(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GGGA(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGGA(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GGGA(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGGA(N, X, Y, Z, =_in_ag(M, U)) U10_GGGA(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGGA(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) U11_GGGA(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_GGGA(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U12_GGGA(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> MOVE_IN_GAGG(M, Z, Y, X) MOVE_IN_GAGG(N, X, Y, Z) -> U6_GAGG(N, X, Y, Z, =_in_ag(X1, N)) U6_GAGG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GAGG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_GAGG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GAGG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GAGG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GAGG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GAGG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GAGG(N, X, Y, Z, =_in_ag(M, U)) U10_GAGG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GAGG(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U11_GAGG(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_GAGG(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_GAGG(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> MOVE_IN_GGGA(M, Z, Y, X) MOVE_IN_GGGA(N, X, Y, Z) -> U6_GGGA(N, X, Y, Z, =_in_ag(X1, N)) U6_GGGA(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGGA(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U10_GAGG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GAGG(M, X, Z, Y) U11_GGGA(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> MOVE_IN_GGGA(succ(zero), X, Y, X2) U10_GGGA(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGAG(M, X, Z, Y) MOVE_IN_GGAG(N, X, Y, Z) -> U6_GGAG(N, X, Y, Z, =_in_ag(X1, N)) U6_GGAG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGAG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_GGAG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGAG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GGAG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGAG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GGAG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGAG(N, X, Y, Z, =_in_ag(M, U)) U10_GGAG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGAG(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U11_GGAG(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_GGAG(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_GGAG(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> MOVE_IN_GGAG(M, Z, Y, X) U10_GGAG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGGA(M, X, Z, Y) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg(succ(X), zero) isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg(succ(X), pred(Y)) isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(X, Y, isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg(zero, pred(Y)) isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(X, Y, isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y), pred(Z)) -> U18_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), succ(Y), Z) -> U20_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), succ(Y), pred(pred(Z))) -> U22_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) =_in_ag(X, X) -> =_out_ag(X, X) move_in_ggag(succ(zero), X, Y, X1) -> U1_ggag(X, Y, X1, write_in_g('Move top disk from ')) move_in_ggag(N, X, Y, Z) -> U6_ggag(N, X, Y, Z, =_in_ag(X1, N)) move_in_ggga(succ(zero), X, Y, X1) -> U1_ggga(X, Y, X1, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y, Z) -> U6_ggga(N, X, Y, Z, =_in_ag(X1, N)) move_in_gagg(succ(zero), X, Y, X1) -> U1_gagg(X, Y, X1, write_in_g('Move top disk from ')) move_in_gagg(N, X, Y, Z) -> U6_gagg(N, X, Y, Z, =_in_ag(X1, N)) move_in_gaga(succ(zero), X, Y, X1) -> U1_gaga(X, Y, X1, write_in_g('Move top disk from ')) move_in_gaga(N, X, Y, Z) -> U6_gaga(N, X, Y, Z, =_in_ag(X1, N)) move_in_ggaa(succ(zero), X, Y, X1) -> U1_ggaa(X, Y, X1, write_in_g('Move top disk from ')) move_in_ggaa(N, X, Y, Z) -> U6_ggaa(N, X, Y, Z, =_in_ag(X1, N)) U47_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U48_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U18_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, succ(Y), pred(Z)) U20_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), succ(Y), Z) U22_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), succ(Y), pred(pred(Z))) U1_ggag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggag(X, Y, X1, write_in_g(X)) U6_ggag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U1_ggga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggga(X, Y, X1, write_in_g(X)) U6_ggga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U1_gagg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gagg(X, Y, X1, write_in_a(X)) U6_gagg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gagg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U1_gaga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaga(X, Y, X1, write_in_a(X)) U6_gaga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U1_ggaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggaa(X, Y, X1, write_in_g(X)) U6_ggaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) isMinus_in_gga(X, zero, X) -> isMinus_out_gga(X, zero, X) isMinus_in_gga(zero, pred(Y), succ(Z)) -> U19_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), pred(Y), succ(succ(Z))) -> U21_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), pred(Y), Z) -> U23_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) write_in_g(X0) -> write_out_g(X0) U2_ggag(X, Y, X1, write_out_g(X)) -> U3_ggag(X, Y, X1, write_in_g(' to ')) U7_ggag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U2_ggga(X, Y, X1, write_out_g(X)) -> U3_ggga(X, Y, X1, write_in_g(' to ')) U7_ggga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U2_gagg(X, Y, X1, write_out_a(X)) -> U3_gagg(X, Y, X1, write_in_g(' to ')) U7_gagg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gagg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U2_gaga(X, Y, X1, write_out_a(X)) -> U3_gaga(X, Y, X1, write_in_g(' to ')) U7_gaga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U2_ggaa(X, Y, X1, write_out_g(X)) -> U3_ggaa(X, Y, X1, write_in_g(' to ')) U7_ggaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U19_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, pred(Y), succ(Z)) U21_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), pred(Y), succ(succ(Z))) U23_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), pred(Y), Z) U3_ggag(X, Y, X1, write_out_g(' to ')) -> U4_ggag(X, Y, X1, write_in_a(Y)) U8_ggag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U3_ggga(X, Y, X1, write_out_g(' to ')) -> U4_ggga(X, Y, X1, write_in_g(Y)) U8_ggga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) write_in_a(X0) -> write_out_a(X0) U3_gagg(X, Y, X1, write_out_g(' to ')) -> U4_gagg(X, Y, X1, write_in_g(Y)) U8_gagg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gagg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U3_gaga(X, Y, X1, write_out_g(' to ')) -> U4_gaga(X, Y, X1, write_in_g(Y)) U8_gaga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U3_ggaa(X, Y, X1, write_out_g(' to ')) -> U4_ggaa(X, Y, X1, write_in_a(Y)) U8_ggaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U4_ggag(X, Y, X1, write_out_a(Y)) -> U5_ggag(X, Y, X1, nl_in_) U9_ggag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggag(N, X, Y, Z, =_in_ag(M, U)) U4_ggga(X, Y, X1, write_out_g(Y)) -> U5_ggga(X, Y, X1, nl_in_) U9_ggga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggga(N, X, Y, Z, =_in_ag(M, U)) U4_gagg(X, Y, X1, write_out_g(Y)) -> U5_gagg(X, Y, X1, nl_in_) U9_gagg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gagg(N, X, Y, Z, =_in_ag(M, U)) U4_gaga(X, Y, X1, write_out_g(Y)) -> U5_gaga(X, Y, X1, nl_in_) U9_gaga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaga(N, X, Y, Z, =_in_ag(M, U)) U4_ggaa(X, Y, X1, write_out_a(Y)) -> U5_ggaa(X, Y, X1, nl_in_) U9_ggaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggaa(N, X, Y, Z, =_in_ag(M, U)) U5_ggag(X, Y, X1, nl_out_) -> move_out_ggag(succ(zero), X, Y, X1) U10_ggag(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggag(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U5_ggga(X, Y, X1, nl_out_) -> move_out_ggga(succ(zero), X, Y, X1) U10_ggga(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggga(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) U5_gagg(X, Y, X1, nl_out_) -> move_out_gagg(succ(zero), X, Y, X1) U10_gagg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gagg(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U5_gaga(X, Y, X1, nl_out_) -> move_out_gaga(succ(zero), X, Y, X1) U10_gaga(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaga(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U5_ggaa(X, Y, X1, nl_out_) -> move_out_ggaa(succ(zero), X, Y, X1) U10_ggaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggaa(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) nl_in_ -> nl_out_ U11_ggag(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_ggag(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U11_ggga(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_ggga(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U11_gagg(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_gagg(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U11_gaga(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_gaga(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U11_ggaa(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_ggaa(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_ggag(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggag(N, X, Y, Z, move_in_ggag(M, Z, Y, X)) U12_ggga(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_ggga(N, X, Y, Z, move_in_gagg(M, Z, Y, X)) U12_gagg(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gagg(N, X, Y, Z, move_in_ggga(M, Z, Y, X)) move_in_gaag(succ(zero), X, Y, X1) -> U1_gaag(X, Y, X1, write_in_g('Move top disk from ')) move_in_gaag(N, X, Y, Z) -> U6_gaag(N, X, Y, Z, =_in_ag(X1, N)) U12_gaga(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gaga(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U12_ggaa(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggaa(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) U13_ggag(N, X, Y, Z, move_out_ggag(M, Z, Y, X)) -> move_out_ggag(N, X, Y, Z) U13_ggga(N, X, Y, Z, move_out_gagg(M, Z, Y, X)) -> move_out_ggga(N, X, Y, Z) U13_gagg(N, X, Y, Z, move_out_ggga(M, Z, Y, X)) -> move_out_gagg(N, X, Y, Z) U1_gaag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaag(X, Y, X1, write_in_a(X)) U6_gaag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U13_gaga(N, X, Y, Z, move_out_gaga(M, Z, Y, X)) -> move_out_gaga(N, X, Y, Z) U13_ggaa(N, X, Y, Z, move_out_gaag(M, Z, Y, X)) -> move_out_ggaa(N, X, Y, Z) U2_gaag(X, Y, X1, write_out_a(X)) -> U3_gaag(X, Y, X1, write_in_g(' to ')) U7_gaag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U3_gaag(X, Y, X1, write_out_g(' to ')) -> U4_gaag(X, Y, X1, write_in_a(Y)) U8_gaag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U4_gaag(X, Y, X1, write_out_a(Y)) -> U5_gaag(X, Y, X1, nl_in_) U9_gaag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaag(N, X, Y, Z, =_in_ag(M, U)) U5_gaag(X, Y, X1, nl_out_) -> move_out_gaag(succ(zero), X, Y, X1) U10_gaag(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaag(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) U11_gaag(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_gaag(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_gaag(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaag(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) move_in_gaaa(succ(zero), X, Y, X1) -> U1_gaaa(X, Y, X1, write_in_g('Move top disk from ')) move_in_gaaa(N, X, Y, Z) -> U6_gaaa(N, X, Y, Z, =_in_ag(X1, N)) U13_gaag(N, X, Y, Z, move_out_ggaa(M, Z, Y, X)) -> move_out_gaag(N, X, Y, Z) U1_gaaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaaa(X, Y, X1, write_in_a(X)) U6_gaaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U2_gaaa(X, Y, X1, write_out_a(X)) -> U3_gaaa(X, Y, X1, write_in_g(' to ')) U7_gaaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U3_gaaa(X, Y, X1, write_out_g(' to ')) -> U4_gaaa(X, Y, X1, write_in_a(Y)) U8_gaaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U4_gaaa(X, Y, X1, write_out_a(Y)) -> U5_gaaa(X, Y, X1, nl_in_) U9_gaaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaaa(N, X, Y, Z, =_in_ag(M, U)) U5_gaaa(X, Y, X1, nl_out_) -> move_out_gaaa(succ(zero), X, Y, X1) U10_gaaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaaa(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U11_gaaa(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_gaaa(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_gaaa(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaaa(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U13_gaaa(N, X, Y, Z, move_out_gaaa(M, Z, Y, X)) -> move_out_gaaa(N, X, Y, Z) The argument filtering Pi contains the following mapping: succ(x1) = succ(x1) zero = zero write_in_g(x1) = write_in_g(x1) write_out_g(x1) = write_out_g 'Move top disk from ' = 'Move top disk from ' ' to ' = ' to ' nl_in_ = nl_in_ nl_out_ = nl_out_ =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U47_gg(x1, x2, x3) = U47_gg(x3) U48_gg(x1, x2, x3) = U48_gg(x3) isMinus_in_gga(x1, x2, x3) = isMinus_in_gga(x1, x2) isMinus_out_gga(x1, x2, x3) = isMinus_out_gga(x3) U18_gga(x1, x2, x3) = U18_gga(x3) U19_gga(x1, x2, x3) = U19_gga(x3) U20_gga(x1, x2, x3, x4) = U20_gga(x4) U21_gga(x1, x2, x3, x4) = U21_gga(x4) U22_gga(x1, x2, x3, x4) = U22_gga(x4) U23_gga(x1, x2, x3, x4) = U23_gga(x4) move_in_ggga(x1, x2, x3, x4) = move_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4) = U1_ggga(x1, x2, x4) U2_ggga(x1, x2, x3, x4) = U2_ggga(x2, x4) U3_ggga(x1, x2, x3, x4) = U3_ggga(x2, x4) U4_ggga(x1, x2, x3, x4) = U4_ggga(x4) U5_ggga(x1, x2, x3, x4) = U5_ggga(x4) move_out_ggga(x1, x2, x3, x4) = move_out_ggga U6_ggga(x1, x2, x3, x4, x5) = U6_ggga(x1, x2, x3, x5) U7_ggga(x1, x2, x3, x4, x5, x6) = U7_ggga(x1, x2, x3, x5, x6) U8_ggga(x1, x2, x3, x4, x5, x6, x7) = U8_ggga(x1, x2, x3, x7) U9_ggga(x1, x2, x3, x4, x5) = U9_ggga(x2, x3, x5) U10_ggga(x1, x2, x3, x4, x5) = U10_ggga(x2, x3, x5) U11_ggga(x1, x2, x3, x4, x5, x6) = U11_ggga(x2, x3, x5, x6) move_in_ggag(x1, x2, x3, x4) = move_in_ggag(x1, x2, x4) U1_ggag(x1, x2, x3, x4) = U1_ggag(x1, x4) U2_ggag(x1, x2, x3, x4) = U2_ggag(x4) U3_ggag(x1, x2, x3, x4) = U3_ggag(x4) U4_ggag(x1, x2, x3, x4) = U4_ggag(x4) write_in_a(x1) = write_in_a write_out_a(x1) = write_out_a U5_ggag(x1, x2, x3, x4) = U5_ggag(x4) move_out_ggag(x1, x2, x3, x4) = move_out_ggag U6_ggag(x1, x2, x3, x4, x5) = U6_ggag(x1, x2, x4, x5) U7_ggag(x1, x2, x3, x4, x5, x6) = U7_ggag(x1, x2, x4, x5, x6) U8_ggag(x1, x2, x3, x4, x5, x6, x7) = U8_ggag(x1, x2, x4, x7) U9_ggag(x1, x2, x3, x4, x5) = U9_ggag(x2, x4, x5) U10_ggag(x1, x2, x3, x4, x5) = U10_ggag(x2, x4, x5) U11_ggag(x1, x2, x3, x4, x5, x6) = U11_ggag(x2, x4, x5, x6) U12_ggag(x1, x2, x3, x4, x5, x6) = U12_ggag(x2, x4, x5, x6) move_in_ggaa(x1, x2, x3, x4) = move_in_ggaa(x1, x2) U1_ggaa(x1, x2, x3, x4) = U1_ggaa(x1, x4) U2_ggaa(x1, x2, x3, x4) = U2_ggaa(x4) U3_ggaa(x1, x2, x3, x4) = U3_ggaa(x4) U4_ggaa(x1, x2, x3, x4) = U4_ggaa(x4) U5_ggaa(x1, x2, x3, x4) = U5_ggaa(x4) move_out_ggaa(x1, x2, x3, x4) = move_out_ggaa U6_ggaa(x1, x2, x3, x4, x5) = U6_ggaa(x1, x2, x5) U7_ggaa(x1, x2, x3, x4, x5, x6) = U7_ggaa(x1, x2, x5, x6) U8_ggaa(x1, x2, x3, x4, x5, x6, x7) = U8_ggaa(x1, x2, x7) U9_ggaa(x1, x2, x3, x4, x5) = U9_ggaa(x2, x5) U10_ggaa(x1, x2, x3, x4, x5) = U10_ggaa(x2, x5) U11_ggaa(x1, x2, x3, x4, x5, x6) = U11_ggaa(x2, x5, x6) U12_ggaa(x1, x2, x3, x4, x5, x6) = U12_ggaa(x2, x5, x6) U13_ggaa(x1, x2, x3, x4, x5) = U13_ggaa(x5) move_in_gaag(x1, x2, x3, x4) = move_in_gaag(x1, x4) U1_gaag(x1, x2, x3, x4) = U1_gaag(x4) U2_gaag(x1, x2, x3, x4) = U2_gaag(x4) U3_gaag(x1, x2, x3, x4) = U3_gaag(x4) U4_gaag(x1, x2, x3, x4) = U4_gaag(x4) U5_gaag(x1, x2, x3, x4) = U5_gaag(x4) move_out_gaag(x1, x2, x3, x4) = move_out_gaag U6_gaag(x1, x2, x3, x4, x5) = U6_gaag(x1, x4, x5) U7_gaag(x1, x2, x3, x4, x5, x6) = U7_gaag(x1, x4, x5, x6) U8_gaag(x1, x2, x3, x4, x5, x6, x7) = U8_gaag(x1, x4, x7) U9_gaag(x1, x2, x3, x4, x5) = U9_gaag(x4, x5) U10_gaag(x1, x2, x3, x4, x5) = U10_gaag(x4, x5) U11_gaag(x1, x2, x3, x4, x5, x6) = U11_gaag(x4, x5, x6) move_in_gaga(x1, x2, x3, x4) = move_in_gaga(x1, x3) U1_gaga(x1, x2, x3, x4) = U1_gaga(x2, x4) U2_gaga(x1, x2, x3, x4) = U2_gaga(x2, x4) U3_gaga(x1, x2, x3, x4) = U3_gaga(x2, x4) U4_gaga(x1, x2, x3, x4) = U4_gaga(x4) U5_gaga(x1, x2, x3, x4) = U5_gaga(x4) move_out_gaga(x1, x2, x3, x4) = move_out_gaga U6_gaga(x1, x2, x3, x4, x5) = U6_gaga(x1, x3, x5) U7_gaga(x1, x2, x3, x4, x5, x6) = U7_gaga(x1, x3, x5, x6) U8_gaga(x1, x2, x3, x4, x5, x6, x7) = U8_gaga(x1, x3, x7) U9_gaga(x1, x2, x3, x4, x5) = U9_gaga(x3, x5) U10_gaga(x1, x2, x3, x4, x5) = U10_gaga(x3, x5) U11_gaga(x1, x2, x3, x4, x5, x6) = U11_gaga(x3, x5, x6) U12_gaga(x1, x2, x3, x4, x5, x6) = U12_gaga(x3, x5, x6) U13_gaga(x1, x2, x3, x4, x5) = U13_gaga(x5) U12_gaag(x1, x2, x3, x4, x5, x6) = U12_gaag(x4, x5, x6) move_in_gaaa(x1, x2, x3, x4) = move_in_gaaa(x1) U1_gaaa(x1, x2, x3, x4) = U1_gaaa(x4) U2_gaaa(x1, x2, x3, x4) = U2_gaaa(x4) U3_gaaa(x1, x2, x3, x4) = U3_gaaa(x4) U4_gaaa(x1, x2, x3, x4) = U4_gaaa(x4) U5_gaaa(x1, x2, x3, x4) = U5_gaaa(x4) move_out_gaaa(x1, x2, x3, x4) = move_out_gaaa U6_gaaa(x1, x2, x3, x4, x5) = U6_gaaa(x1, x5) U7_gaaa(x1, x2, x3, x4, x5, x6) = U7_gaaa(x1, x5, x6) U8_gaaa(x1, x2, x3, x4, x5, x6, x7) = U8_gaaa(x1, x7) U9_gaaa(x1, x2, x3, x4, x5) = U9_gaaa(x5) U10_gaaa(x1, x2, x3, x4, x5) = U10_gaaa(x5) U11_gaaa(x1, x2, x3, x4, x5, x6) = U11_gaaa(x5, x6) U12_gaaa(x1, x2, x3, x4, x5, x6) = U12_gaaa(x5, x6) U13_gaaa(x1, x2, x3, x4, x5) = U13_gaaa(x5) U13_gaag(x1, x2, x3, x4, x5) = U13_gaag(x5) U13_ggag(x1, x2, x3, x4, x5) = U13_ggag(x5) U12_ggga(x1, x2, x3, x4, x5, x6) = U12_ggga(x2, x3, x5, x6) U13_ggga(x1, x2, x3, x4, x5) = U13_ggga(x5) move_in_gagg(x1, x2, x3, x4) = move_in_gagg(x1, x3, x4) U1_gagg(x1, x2, x3, x4) = U1_gagg(x2, x4) U2_gagg(x1, x2, x3, x4) = U2_gagg(x2, x4) U3_gagg(x1, x2, x3, x4) = U3_gagg(x2, x4) U4_gagg(x1, x2, x3, x4) = U4_gagg(x4) U5_gagg(x1, x2, x3, x4) = U5_gagg(x4) move_out_gagg(x1, x2, x3, x4) = move_out_gagg U6_gagg(x1, x2, x3, x4, x5) = U6_gagg(x1, x3, x4, x5) U7_gagg(x1, x2, x3, x4, x5, x6) = U7_gagg(x1, x3, x4, x5, x6) U8_gagg(x1, x2, x3, x4, x5, x6, x7) = U8_gagg(x1, x3, x4, x7) U9_gagg(x1, x2, x3, x4, x5) = U9_gagg(x3, x4, x5) U10_gagg(x1, x2, x3, x4, x5) = U10_gagg(x3, x4, x5) U11_gagg(x1, x2, x3, x4, x5, x6) = U11_gagg(x3, x4, x5, x6) U12_gagg(x1, x2, x3, x4, x5, x6) = U12_gagg(x3, x4, x5, x6) U13_gagg(x1, x2, x3, x4, x5) = U13_gagg(x5) MOVE_IN_GGGA(x1, x2, x3, x4) = MOVE_IN_GGGA(x1, x2, x3) U6_GGGA(x1, x2, x3, x4, x5) = U6_GGGA(x1, x2, x3, x5) U7_GGGA(x1, x2, x3, x4, x5, x6) = U7_GGGA(x1, x2, x3, x5, x6) U8_GGGA(x1, x2, x3, x4, x5, x6, x7) = U8_GGGA(x1, x2, x3, x7) U9_GGGA(x1, x2, x3, x4, x5) = U9_GGGA(x2, x3, x5) U10_GGGA(x1, x2, x3, x4, x5) = U10_GGGA(x2, x3, x5) U11_GGGA(x1, x2, x3, x4, x5, x6) = U11_GGGA(x2, x3, x5, x6) MOVE_IN_GGAG(x1, x2, x3, x4) = MOVE_IN_GGAG(x1, x2, x4) U6_GGAG(x1, x2, x3, x4, x5) = U6_GGAG(x1, x2, x4, x5) U7_GGAG(x1, x2, x3, x4, x5, x6) = U7_GGAG(x1, x2, x4, x5, x6) U8_GGAG(x1, x2, x3, x4, x5, x6, x7) = U8_GGAG(x1, x2, x4, x7) U9_GGAG(x1, x2, x3, x4, x5) = U9_GGAG(x2, x4, x5) U10_GGAG(x1, x2, x3, x4, x5) = U10_GGAG(x2, x4, x5) U11_GGAG(x1, x2, x3, x4, x5, x6) = U11_GGAG(x2, x4, x5, x6) U12_GGAG(x1, x2, x3, x4, x5, x6) = U12_GGAG(x2, x4, x5, x6) U12_GGGA(x1, x2, x3, x4, x5, x6) = U12_GGGA(x2, x3, x5, x6) MOVE_IN_GAGG(x1, x2, x3, x4) = MOVE_IN_GAGG(x1, x3, x4) U6_GAGG(x1, x2, x3, x4, x5) = U6_GAGG(x1, x3, x4, x5) U7_GAGG(x1, x2, x3, x4, x5, x6) = U7_GAGG(x1, x3, x4, x5, x6) U8_GAGG(x1, x2, x3, x4, x5, x6, x7) = U8_GAGG(x1, x3, x4, x7) U9_GAGG(x1, x2, x3, x4, x5) = U9_GAGG(x3, x4, x5) U10_GAGG(x1, x2, x3, x4, x5) = U10_GAGG(x3, x4, x5) U11_GAGG(x1, x2, x3, x4, x5, x6) = U11_GAGG(x3, x4, x5, x6) U12_GAGG(x1, x2, x3, x4, x5, x6) = U12_GAGG(x3, x4, x5, x6) We have to consider all (P,R,Pi)-chains ---------------------------------------- (475) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (476) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(N, X, Y, X1, =_out_ag(X3)) -> U8_GGGA(N, X, Y, isGreater_in_gg(X1, X3)) U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_in_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_in_ag(N)) U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_in_ag(succ(zero))) U7_GAGG(N, Y, Z, X1, =_out_ag(X3)) -> U8_GAGG(N, Y, Z, isGreater_in_gg(X1, X3)) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_in_ag(U)) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_in_ag(N)) U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_in_ag(succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_in_ag(N)) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_in_ag(succ(zero))) U7_GGAG(N, X, Z, X1, =_out_ag(X3)) -> U8_GGAG(N, X, Z, isGreater_in_gg(X1, X3)) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_in_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (477) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_in_ag(U)) at position [2] we obtained the following new rules [LPAR04]: (U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)),U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U))) ---------------------------------------- (478) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(N, X, Y, X1, =_out_ag(X3)) -> U8_GGGA(N, X, Y, isGreater_in_gg(X1, X3)) U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_in_ag(N)) U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_in_ag(succ(zero))) U7_GAGG(N, Y, Z, X1, =_out_ag(X3)) -> U8_GAGG(N, Y, Z, isGreater_in_gg(X1, X3)) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_in_ag(U)) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_in_ag(N)) U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_in_ag(succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_in_ag(N)) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_in_ag(succ(zero))) U7_GGAG(N, X, Z, X1, =_out_ag(X3)) -> U8_GGAG(N, X, Z, isGreater_in_gg(X1, X3)) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_in_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (479) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_in_ag(N)) at position [3] we obtained the following new rules [LPAR04]: (MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)),MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N))) ---------------------------------------- (480) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(N, X, Y, X1, =_out_ag(X3)) -> U8_GGGA(N, X, Y, isGreater_in_gg(X1, X3)) U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_in_ag(succ(zero))) U7_GAGG(N, Y, Z, X1, =_out_ag(X3)) -> U8_GAGG(N, Y, Z, isGreater_in_gg(X1, X3)) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_in_ag(U)) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_in_ag(N)) U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_in_ag(succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_in_ag(N)) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_in_ag(succ(zero))) U7_GGAG(N, X, Z, X1, =_out_ag(X3)) -> U8_GGAG(N, X, Z, isGreater_in_gg(X1, X3)) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_in_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (481) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_in_ag(succ(zero))) at position [4] we obtained the following new rules [LPAR04]: (U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_out_ag(succ(zero))),U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_out_ag(succ(zero)))) ---------------------------------------- (482) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(N, X, Y, X1, =_out_ag(X3)) -> U8_GGGA(N, X, Y, isGreater_in_gg(X1, X3)) U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U7_GAGG(N, Y, Z, X1, =_out_ag(X3)) -> U8_GAGG(N, Y, Z, isGreater_in_gg(X1, X3)) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_in_ag(U)) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_in_ag(N)) U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_in_ag(succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_in_ag(N)) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_in_ag(succ(zero))) U7_GGAG(N, X, Z, X1, =_out_ag(X3)) -> U8_GGAG(N, X, Z, isGreater_in_gg(X1, X3)) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_in_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (483) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_in_ag(U)) at position [2] we obtained the following new rules [LPAR04]: (U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)),U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U))) ---------------------------------------- (484) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(N, X, Y, X1, =_out_ag(X3)) -> U8_GGGA(N, X, Y, isGreater_in_gg(X1, X3)) U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U7_GAGG(N, Y, Z, X1, =_out_ag(X3)) -> U8_GAGG(N, Y, Z, isGreater_in_gg(X1, X3)) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_in_ag(N)) U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_in_ag(succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_in_ag(N)) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_in_ag(succ(zero))) U7_GGAG(N, X, Z, X1, =_out_ag(X3)) -> U8_GGAG(N, X, Z, isGreater_in_gg(X1, X3)) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_in_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_out_ag(succ(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (485) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_in_ag(N)) at position [3] we obtained the following new rules [LPAR04]: (MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)),MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N))) ---------------------------------------- (486) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(N, X, Y, X1, =_out_ag(X3)) -> U8_GGGA(N, X, Y, isGreater_in_gg(X1, X3)) U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U7_GAGG(N, Y, Z, X1, =_out_ag(X3)) -> U8_GAGG(N, Y, Z, isGreater_in_gg(X1, X3)) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_in_ag(succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_in_ag(N)) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_in_ag(succ(zero))) U7_GGAG(N, X, Z, X1, =_out_ag(X3)) -> U8_GGAG(N, X, Z, isGreater_in_gg(X1, X3)) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_in_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_out_ag(succ(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (487) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_in_ag(succ(zero))) at position [4] we obtained the following new rules [LPAR04]: (U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_out_ag(succ(zero))),U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_out_ag(succ(zero)))) ---------------------------------------- (488) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(N, X, Y, X1, =_out_ag(X3)) -> U8_GGGA(N, X, Y, isGreater_in_gg(X1, X3)) U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U7_GAGG(N, Y, Z, X1, =_out_ag(X3)) -> U8_GAGG(N, Y, Z, isGreater_in_gg(X1, X3)) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_in_ag(N)) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_in_ag(succ(zero))) U7_GGAG(N, X, Z, X1, =_out_ag(X3)) -> U8_GGAG(N, X, Z, isGreater_in_gg(X1, X3)) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_in_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_out_ag(succ(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (489) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_in_ag(N)) at position [3] we obtained the following new rules [LPAR04]: (MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)),MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N))) ---------------------------------------- (490) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(N, X, Y, X1, =_out_ag(X3)) -> U8_GGGA(N, X, Y, isGreater_in_gg(X1, X3)) U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U7_GAGG(N, Y, Z, X1, =_out_ag(X3)) -> U8_GAGG(N, Y, Z, isGreater_in_gg(X1, X3)) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_in_ag(succ(zero))) U7_GGAG(N, X, Z, X1, =_out_ag(X3)) -> U8_GGAG(N, X, Z, isGreater_in_gg(X1, X3)) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_in_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_out_ag(succ(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_out_ag(succ(zero))) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (491) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_in_ag(succ(zero))) at position [4] we obtained the following new rules [LPAR04]: (U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_out_ag(succ(zero))),U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_out_ag(succ(zero)))) ---------------------------------------- (492) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(N, X, Y, X1, =_out_ag(X3)) -> U8_GGGA(N, X, Y, isGreater_in_gg(X1, X3)) U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U7_GAGG(N, Y, Z, X1, =_out_ag(X3)) -> U8_GAGG(N, Y, Z, isGreater_in_gg(X1, X3)) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U7_GGAG(N, X, Z, X1, =_out_ag(X3)) -> U8_GGAG(N, X, Z, isGreater_in_gg(X1, X3)) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_in_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_out_ag(succ(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_out_ag(succ(zero))) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (493) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_in_ag(U)) at position [2] we obtained the following new rules [LPAR04]: (U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)),U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U))) ---------------------------------------- (494) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(N, X, Y, X1, =_out_ag(X3)) -> U8_GGGA(N, X, Y, isGreater_in_gg(X1, X3)) U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U7_GAGG(N, Y, Z, X1, =_out_ag(X3)) -> U8_GAGG(N, Y, Z, isGreater_in_gg(X1, X3)) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U7_GGAG(N, X, Z, X1, =_out_ag(X3)) -> U8_GGAG(N, X, Z, isGreater_in_gg(X1, X3)) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_out_ag(succ(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_out_ag(succ(zero))) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_out_ag(succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (495) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GGGA(N, X, Y, X1, =_out_ag(X3)) -> U8_GGGA(N, X, Y, isGreater_in_gg(X1, X3)) we obtained the following new rules [LPAR04]: (U7_GGGA(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z3, succ(zero))),U7_GGGA(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z3, succ(zero)))) ---------------------------------------- (496) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U7_GAGG(N, Y, Z, X1, =_out_ag(X3)) -> U8_GAGG(N, Y, Z, isGreater_in_gg(X1, X3)) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U7_GGAG(N, X, Z, X1, =_out_ag(X3)) -> U8_GGAG(N, X, Z, isGreater_in_gg(X1, X3)) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_out_ag(succ(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_out_ag(succ(zero))) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_out_ag(succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U7_GGGA(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (497) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GAGG(N, Y, Z, X1, =_out_ag(X3)) -> U8_GAGG(N, Y, Z, isGreater_in_gg(X1, X3)) we obtained the following new rules [LPAR04]: (U7_GAGG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))),U7_GAGG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z3, succ(zero)))) ---------------------------------------- (498) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U7_GGAG(N, X, Z, X1, =_out_ag(X3)) -> U8_GGAG(N, X, Z, isGreater_in_gg(X1, X3)) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_out_ag(succ(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_out_ag(succ(zero))) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_out_ag(succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U7_GGGA(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U7_GAGG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (499) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GGAG(N, X, Z, X1, =_out_ag(X3)) -> U8_GGAG(N, X, Z, isGreater_in_gg(X1, X3)) we obtained the following new rules [LPAR04]: (U7_GGAG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))),U7_GGAG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z3, succ(zero)))) ---------------------------------------- (500) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_out_ag(succ(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_out_ag(succ(zero))) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_out_ag(succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U7_GGGA(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U7_GAGG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U7_GGAG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (501) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U6_GAGG(N, Y, Z, =_out_ag(X1)) -> U7_GAGG(N, Y, Z, X1, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))),U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero)))) ---------------------------------------- (502) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_out_ag(succ(zero))) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_out_ag(succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U7_GGGA(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U7_GAGG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U7_GGAG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (503) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U6_GGGA(N, X, Y, =_out_ag(X1)) -> U7_GGGA(N, X, Y, X1, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))),U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero)))) ---------------------------------------- (504) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_out_ag(succ(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U7_GGGA(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U7_GAGG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U7_GGAG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (505) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U6_GGAG(N, X, Z, =_out_ag(X1)) -> U7_GGAG(N, X, Z, X1, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))),U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero)))) ---------------------------------------- (506) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U7_GGGA(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U7_GAGG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U7_GGAG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (507) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GGGA(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) we obtained the following new rules [LPAR04]: (U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))),U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero)))) ---------------------------------------- (508) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U7_GAGG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U7_GGAG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (509) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GAGG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) we obtained the following new rules [LPAR04]: (U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))),U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero)))) ---------------------------------------- (510) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U7_GGAG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (511) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GGAG(z0, z1, z2, z3, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z3, succ(zero))) we obtained the following new rules [LPAR04]: (U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))),U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero)))) ---------------------------------------- (512) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (513) TransformationProof (SOUND) By narrowing [LPAR04] the rule U8_GGGA(N, X, Y, isGreater_out_gg) -> U9_GGGA(X, Y, isMinus_in_gga(N, succ(zero))) at position [2] we obtained the following new rules [LPAR04]: (U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U18_gga(isMinus_in_gga(zero, zero))),U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U18_gga(isMinus_in_gga(zero, zero)))) (U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U20_gga(isMinus_in_gga(x0, zero))),U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U20_gga(isMinus_in_gga(x0, zero)))) (U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U22_gga(isMinus_in_gga(x0, zero))),U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U22_gga(isMinus_in_gga(x0, zero)))) ---------------------------------------- (514) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U18_gga(isMinus_in_gga(zero, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U20_gga(isMinus_in_gga(x0, zero))) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U22_gga(isMinus_in_gga(x0, zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (515) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U18_gga(isMinus_in_gga(zero, zero))) at position [2,0] we obtained the following new rules [LPAR04]: (U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U18_gga(isMinus_out_gga(zero))),U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U18_gga(isMinus_out_gga(zero)))) ---------------------------------------- (516) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U20_gga(isMinus_in_gga(x0, zero))) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U22_gga(isMinus_in_gga(x0, zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U18_gga(isMinus_out_gga(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (517) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U20_gga(isMinus_in_gga(x0, zero))) at position [2,0] we obtained the following new rules [LPAR04]: (U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U20_gga(isMinus_out_gga(x0))),U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U20_gga(isMinus_out_gga(x0)))) ---------------------------------------- (518) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U22_gga(isMinus_in_gga(x0, zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U18_gga(isMinus_out_gga(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U20_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (519) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U22_gga(isMinus_in_gga(x0, zero))) at position [2,0] we obtained the following new rules [LPAR04]: (U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U22_gga(isMinus_out_gga(x0))),U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U22_gga(isMinus_out_gga(x0)))) ---------------------------------------- (520) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U18_gga(isMinus_out_gga(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U20_gga(isMinus_out_gga(x0))) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U22_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (521) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U18_gga(isMinus_out_gga(zero))) at position [2] we obtained the following new rules [LPAR04]: (U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))),U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero)))) ---------------------------------------- (522) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U20_gga(isMinus_out_gga(x0))) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U22_gga(isMinus_out_gga(x0))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (523) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U20_gga(isMinus_out_gga(x0))) at position [2] we obtained the following new rules [LPAR04]: (U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)),U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0))) ---------------------------------------- (524) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U22_gga(isMinus_out_gga(x0))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (525) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, U22_gga(isMinus_out_gga(x0))) at position [2] we obtained the following new rules [LPAR04]: (U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))),U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0))))) ---------------------------------------- (526) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (527) TransformationProof (SOUND) By narrowing [LPAR04] the rule U10_GGGA(X, Y, =_out_ag(M)) -> U11_GGGA(X, Y, M, move_in_ggag(M, X, Y)) at position [3] we obtained the following new rules [LPAR04]: (U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U1_ggag(x0, write_in_g('Move top disk from '))),U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U1_ggag(x0, write_in_g('Move top disk from ')))) (U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_in_ag(x0))),U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_in_ag(x0)))) ---------------------------------------- (528) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U1_ggag(x0, write_in_g('Move top disk from '))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_in_ag(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (529) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U1_ggag(x0, write_in_g('Move top disk from '))) at position [3,1] we obtained the following new rules [LPAR04]: (U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U1_ggag(x0, write_out_g)),U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U1_ggag(x0, write_out_g))) ---------------------------------------- (530) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_in_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U1_ggag(x0, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (531) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_in_ag(x0))) at position [3,3] we obtained the following new rules [LPAR04]: (U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))),U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0)))) ---------------------------------------- (532) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U1_ggag(x0, write_out_g)) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (533) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U1_ggag(x0, write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U2_ggag(write_in_g(x0))),U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U2_ggag(write_in_g(x0)))) ---------------------------------------- (534) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U2_ggag(write_in_g(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (535) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U2_ggag(write_in_g(x0))) at position [3,0] we obtained the following new rules [LPAR04]: (U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U2_ggag(write_out_g)),U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U2_ggag(write_out_g))) ---------------------------------------- (536) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U2_ggag(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (537) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U2_ggag(write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U3_ggag(write_in_g(' to '))),U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U3_ggag(write_in_g(' to ')))) ---------------------------------------- (538) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U3_ggag(write_in_g(' to '))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (539) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U3_ggag(write_in_g(' to '))) at position [3,0] we obtained the following new rules [LPAR04]: (U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U3_ggag(write_out_g)),U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U3_ggag(write_out_g))) ---------------------------------------- (540) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U3_ggag(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (541) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U3_ggag(write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U4_ggag(write_in_a)),U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U4_ggag(write_in_a))) ---------------------------------------- (542) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U4_ggag(write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (543) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U4_ggag(write_in_a)) at position [3,0] we obtained the following new rules [LPAR04]: (U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U4_ggag(write_out_a)),U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U4_ggag(write_out_a))) ---------------------------------------- (544) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U4_ggag(write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (545) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U4_ggag(write_out_a)) at position [3] we obtained the following new rules [LPAR04]: (U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U5_ggag(nl_in_)),U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U5_ggag(nl_in_))) ---------------------------------------- (546) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U5_ggag(nl_in_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (547) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U5_ggag(nl_in_)) at position [3,0] we obtained the following new rules [LPAR04]: (U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U5_ggag(nl_out_)),U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U5_ggag(nl_out_))) ---------------------------------------- (548) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U5_ggag(nl_out_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (549) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), U5_ggag(nl_out_)) at position [3] we obtained the following new rules [LPAR04]: (U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag),U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag)) ---------------------------------------- (550) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (551) TransformationProof (SOUND) By narrowing [LPAR04] the rule U11_GGGA(X, Y, M, move_out_ggag) -> U12_GGGA(X, Y, M, move_in_ggga(succ(zero), X, Y)) at position [3] we obtained the following new rules [LPAR04]: (U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U1_ggga(x0, x1, write_in_g('Move top disk from '))),U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U1_ggga(x0, x1, write_in_g('Move top disk from ')))) (U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_in_ag(succ(zero)))),U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_in_ag(succ(zero))))) ---------------------------------------- (552) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U1_ggga(x0, x1, write_in_g('Move top disk from '))) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_in_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (553) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U1_ggga(x0, x1, write_in_g('Move top disk from '))) at position [3,2] we obtained the following new rules [LPAR04]: (U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U1_ggga(x0, x1, write_out_g)),U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U1_ggga(x0, x1, write_out_g))) ---------------------------------------- (554) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_in_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U1_ggga(x0, x1, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (555) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_in_ag(succ(zero)))) at position [3,3] we obtained the following new rules [LPAR04]: (U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))),U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero))))) ---------------------------------------- (556) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U1_ggga(x0, x1, write_out_g)) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (557) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U1_ggga(x0, x1, write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U2_ggga(x1, write_in_g(x0))),U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U2_ggga(x1, write_in_g(x0)))) ---------------------------------------- (558) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U2_ggga(x1, write_in_g(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (559) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U2_ggga(x1, write_in_g(x0))) at position [3,1] we obtained the following new rules [LPAR04]: (U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U2_ggga(x1, write_out_g)),U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U2_ggga(x1, write_out_g))) ---------------------------------------- (560) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U2_ggga(x1, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (561) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U2_ggga(x1, write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U3_ggga(x1, write_in_g(' to '))),U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U3_ggga(x1, write_in_g(' to ')))) ---------------------------------------- (562) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U3_ggga(x1, write_in_g(' to '))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (563) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U3_ggga(x1, write_in_g(' to '))) at position [3,1] we obtained the following new rules [LPAR04]: (U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U3_ggga(x1, write_out_g)),U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U3_ggga(x1, write_out_g))) ---------------------------------------- (564) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U3_ggga(x1, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (565) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U3_ggga(x1, write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U4_ggga(write_in_g(x1))),U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U4_ggga(write_in_g(x1)))) ---------------------------------------- (566) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U4_ggga(write_in_g(x1))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (567) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U4_ggga(write_in_g(x1))) at position [3,0] we obtained the following new rules [LPAR04]: (U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U4_ggga(write_out_g)),U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U4_ggga(write_out_g))) ---------------------------------------- (568) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U4_ggga(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (569) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U4_ggga(write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U5_ggga(nl_in_)),U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U5_ggga(nl_in_))) ---------------------------------------- (570) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U5_ggga(nl_in_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (571) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U5_ggga(nl_in_)) at position [3,0] we obtained the following new rules [LPAR04]: (U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U5_ggga(nl_out_)),U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U5_ggga(nl_out_))) ---------------------------------------- (572) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U5_ggga(nl_out_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (573) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, U5_ggga(nl_out_)) at position [3] we obtained the following new rules [LPAR04]: (U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga),U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga)) ---------------------------------------- (574) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (575) TransformationProof (SOUND) By narrowing [LPAR04] the rule U8_GAGG(N, Y, Z, isGreater_out_gg) -> U9_GAGG(Y, Z, isMinus_in_gga(N, succ(zero))) at position [2] we obtained the following new rules [LPAR04]: (U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U18_gga(isMinus_in_gga(zero, zero))),U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U18_gga(isMinus_in_gga(zero, zero)))) (U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U20_gga(isMinus_in_gga(x0, zero))),U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U20_gga(isMinus_in_gga(x0, zero)))) (U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U22_gga(isMinus_in_gga(x0, zero))),U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U22_gga(isMinus_in_gga(x0, zero)))) ---------------------------------------- (576) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U18_gga(isMinus_in_gga(zero, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U20_gga(isMinus_in_gga(x0, zero))) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U22_gga(isMinus_in_gga(x0, zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (577) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U18_gga(isMinus_in_gga(zero, zero))) at position [2,0] we obtained the following new rules [LPAR04]: (U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U18_gga(isMinus_out_gga(zero))),U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U18_gga(isMinus_out_gga(zero)))) ---------------------------------------- (578) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U20_gga(isMinus_in_gga(x0, zero))) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U22_gga(isMinus_in_gga(x0, zero))) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U18_gga(isMinus_out_gga(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (579) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U20_gga(isMinus_in_gga(x0, zero))) at position [2,0] we obtained the following new rules [LPAR04]: (U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U20_gga(isMinus_out_gga(x0))),U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U20_gga(isMinus_out_gga(x0)))) ---------------------------------------- (580) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U22_gga(isMinus_in_gga(x0, zero))) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U18_gga(isMinus_out_gga(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U20_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (581) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U22_gga(isMinus_in_gga(x0, zero))) at position [2,0] we obtained the following new rules [LPAR04]: (U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U22_gga(isMinus_out_gga(x0))),U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U22_gga(isMinus_out_gga(x0)))) ---------------------------------------- (582) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U18_gga(isMinus_out_gga(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U20_gga(isMinus_out_gga(x0))) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U22_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (583) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U18_gga(isMinus_out_gga(zero))) at position [2] we obtained the following new rules [LPAR04]: (U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))),U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero)))) ---------------------------------------- (584) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U20_gga(isMinus_out_gga(x0))) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U22_gga(isMinus_out_gga(x0))) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (585) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U20_gga(isMinus_out_gga(x0))) at position [2] we obtained the following new rules [LPAR04]: (U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)),U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0))) ---------------------------------------- (586) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U22_gga(isMinus_out_gga(x0))) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (587) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, U22_gga(isMinus_out_gga(x0))) at position [2] we obtained the following new rules [LPAR04]: (U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))),U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0))))) ---------------------------------------- (588) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (589) TransformationProof (SOUND) By narrowing [LPAR04] the rule U10_GAGG(Y, Z, =_out_ag(M)) -> U11_GAGG(Y, Z, M, move_in_gagg(M, Z, Y)) at position [3] we obtained the following new rules [LPAR04]: (U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U1_gagg(x0, write_in_g('Move top disk from '))),U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U1_gagg(x0, write_in_g('Move top disk from ')))) (U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_in_ag(x0))),U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_in_ag(x0)))) ---------------------------------------- (590) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U1_gagg(x0, write_in_g('Move top disk from '))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_in_ag(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (591) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U1_gagg(x0, write_in_g('Move top disk from '))) at position [3,1] we obtained the following new rules [LPAR04]: (U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U1_gagg(x0, write_out_g)),U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U1_gagg(x0, write_out_g))) ---------------------------------------- (592) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_in_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U1_gagg(x0, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (593) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_in_ag(x0))) at position [3,3] we obtained the following new rules [LPAR04]: (U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))),U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0)))) ---------------------------------------- (594) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U1_gagg(x0, write_out_g)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (595) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U1_gagg(x0, write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U2_gagg(x0, write_in_a)),U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U2_gagg(x0, write_in_a))) ---------------------------------------- (596) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U2_gagg(x0, write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (597) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U2_gagg(x0, write_in_a)) at position [3,1] we obtained the following new rules [LPAR04]: (U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U2_gagg(x0, write_out_a)),U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U2_gagg(x0, write_out_a))) ---------------------------------------- (598) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U2_gagg(x0, write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (599) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U2_gagg(x0, write_out_a)) at position [3] we obtained the following new rules [LPAR04]: (U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U3_gagg(x0, write_in_g(' to '))),U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U3_gagg(x0, write_in_g(' to ')))) ---------------------------------------- (600) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U3_gagg(x0, write_in_g(' to '))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (601) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U3_gagg(x0, write_in_g(' to '))) at position [3,1] we obtained the following new rules [LPAR04]: (U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U3_gagg(x0, write_out_g)),U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U3_gagg(x0, write_out_g))) ---------------------------------------- (602) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U3_gagg(x0, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (603) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U3_gagg(x0, write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U4_gagg(write_in_g(x0))),U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U4_gagg(write_in_g(x0)))) ---------------------------------------- (604) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U4_gagg(write_in_g(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (605) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U4_gagg(write_in_g(x0))) at position [3,0] we obtained the following new rules [LPAR04]: (U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U4_gagg(write_out_g)),U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U4_gagg(write_out_g))) ---------------------------------------- (606) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U4_gagg(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (607) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U4_gagg(write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U5_gagg(nl_in_)),U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U5_gagg(nl_in_))) ---------------------------------------- (608) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U5_gagg(nl_in_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (609) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U5_gagg(nl_in_)) at position [3,0] we obtained the following new rules [LPAR04]: (U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U5_gagg(nl_out_)),U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U5_gagg(nl_out_))) ---------------------------------------- (610) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U5_gagg(nl_out_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (611) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), U5_gagg(nl_out_)) at position [3] we obtained the following new rules [LPAR04]: (U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg),U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg)) ---------------------------------------- (612) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (613) TransformationProof (SOUND) By narrowing [LPAR04] the rule U11_GAGG(Y, Z, M, move_out_gagg) -> U12_GAGG(Y, Z, M, move_in_gaga(succ(zero), Y)) at position [3] we obtained the following new rules [LPAR04]: (U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U1_gaga(x0, write_in_g('Move top disk from '))),U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U1_gaga(x0, write_in_g('Move top disk from ')))) (U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_in_ag(succ(zero)))),U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_in_ag(succ(zero))))) ---------------------------------------- (614) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U1_gaga(x0, write_in_g('Move top disk from '))) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_in_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (615) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U1_gaga(x0, write_in_g('Move top disk from '))) at position [3,1] we obtained the following new rules [LPAR04]: (U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U1_gaga(x0, write_out_g)),U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U1_gaga(x0, write_out_g))) ---------------------------------------- (616) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_in_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U1_gaga(x0, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (617) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_in_ag(succ(zero)))) at position [3,2] we obtained the following new rules [LPAR04]: (U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))),U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero))))) ---------------------------------------- (618) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U1_gaga(x0, write_out_g)) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (619) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U1_gaga(x0, write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U2_gaga(x0, write_in_a)),U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U2_gaga(x0, write_in_a))) ---------------------------------------- (620) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U2_gaga(x0, write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (621) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U2_gaga(x0, write_in_a)) at position [3,1] we obtained the following new rules [LPAR04]: (U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U2_gaga(x0, write_out_a)),U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U2_gaga(x0, write_out_a))) ---------------------------------------- (622) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U2_gaga(x0, write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (623) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U2_gaga(x0, write_out_a)) at position [3] we obtained the following new rules [LPAR04]: (U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U3_gaga(x0, write_in_g(' to '))),U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U3_gaga(x0, write_in_g(' to ')))) ---------------------------------------- (624) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U3_gaga(x0, write_in_g(' to '))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (625) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U3_gaga(x0, write_in_g(' to '))) at position [3,1] we obtained the following new rules [LPAR04]: (U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U3_gaga(x0, write_out_g)),U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U3_gaga(x0, write_out_g))) ---------------------------------------- (626) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U3_gaga(x0, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (627) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U3_gaga(x0, write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U4_gaga(write_in_g(x0))),U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U4_gaga(write_in_g(x0)))) ---------------------------------------- (628) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U4_gaga(write_in_g(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (629) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U4_gaga(write_in_g(x0))) at position [3,0] we obtained the following new rules [LPAR04]: (U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U4_gaga(write_out_g)),U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U4_gaga(write_out_g))) ---------------------------------------- (630) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U4_gaga(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (631) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U4_gaga(write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U5_gaga(nl_in_)),U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U5_gaga(nl_in_))) ---------------------------------------- (632) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U5_gaga(nl_in_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (633) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U5_gaga(nl_in_)) at position [3,0] we obtained the following new rules [LPAR04]: (U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U5_gaga(nl_out_)),U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U5_gaga(nl_out_))) ---------------------------------------- (634) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U5_gaga(nl_out_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (635) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, U5_gaga(nl_out_)) at position [3] we obtained the following new rules [LPAR04]: (U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga),U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga)) ---------------------------------------- (636) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (637) TransformationProof (SOUND) By narrowing [LPAR04] the rule U8_GGAG(N, X, Z, isGreater_out_gg) -> U9_GGAG(X, Z, isMinus_in_gga(N, succ(zero))) at position [2] we obtained the following new rules [LPAR04]: (U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U18_gga(isMinus_in_gga(zero, zero))),U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U18_gga(isMinus_in_gga(zero, zero)))) (U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U20_gga(isMinus_in_gga(x0, zero))),U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U20_gga(isMinus_in_gga(x0, zero)))) (U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U22_gga(isMinus_in_gga(x0, zero))),U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U22_gga(isMinus_in_gga(x0, zero)))) ---------------------------------------- (638) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U18_gga(isMinus_in_gga(zero, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U20_gga(isMinus_in_gga(x0, zero))) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U22_gga(isMinus_in_gga(x0, zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (639) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U18_gga(isMinus_in_gga(zero, zero))) at position [2,0] we obtained the following new rules [LPAR04]: (U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U18_gga(isMinus_out_gga(zero))),U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U18_gga(isMinus_out_gga(zero)))) ---------------------------------------- (640) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U20_gga(isMinus_in_gga(x0, zero))) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U22_gga(isMinus_in_gga(x0, zero))) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U18_gga(isMinus_out_gga(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (641) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U20_gga(isMinus_in_gga(x0, zero))) at position [2,0] we obtained the following new rules [LPAR04]: (U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U20_gga(isMinus_out_gga(x0))),U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U20_gga(isMinus_out_gga(x0)))) ---------------------------------------- (642) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U22_gga(isMinus_in_gga(x0, zero))) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U18_gga(isMinus_out_gga(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U20_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (643) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U22_gga(isMinus_in_gga(x0, zero))) at position [2,0] we obtained the following new rules [LPAR04]: (U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U22_gga(isMinus_out_gga(x0))),U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U22_gga(isMinus_out_gga(x0)))) ---------------------------------------- (644) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U18_gga(isMinus_out_gga(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U20_gga(isMinus_out_gga(x0))) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U22_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (645) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U18_gga(isMinus_out_gga(zero))) at position [2] we obtained the following new rules [LPAR04]: (U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))),U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero)))) ---------------------------------------- (646) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U20_gga(isMinus_out_gga(x0))) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U22_gga(isMinus_out_gga(x0))) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (647) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U20_gga(isMinus_out_gga(x0))) at position [2] we obtained the following new rules [LPAR04]: (U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)),U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0))) ---------------------------------------- (648) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U22_gga(isMinus_out_gga(x0))) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (649) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, U22_gga(isMinus_out_gga(x0))) at position [2] we obtained the following new rules [LPAR04]: (U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))),U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0))))) ---------------------------------------- (650) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (651) TransformationProof (SOUND) By narrowing [LPAR04] the rule U10_GGAG(X, Z, =_out_ag(M)) -> U11_GGAG(X, Z, M, move_in_ggga(M, X, Z)) at position [3] we obtained the following new rules [LPAR04]: (U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U1_ggga(x0, x1, write_in_g('Move top disk from '))),U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U1_ggga(x0, x1, write_in_g('Move top disk from ')))) (U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_in_ag(x0))),U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_in_ag(x0)))) ---------------------------------------- (652) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U1_ggga(x0, x1, write_in_g('Move top disk from '))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_in_ag(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (653) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U1_ggga(x0, x1, write_in_g('Move top disk from '))) at position [3,2] we obtained the following new rules [LPAR04]: (U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U1_ggga(x0, x1, write_out_g)),U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U1_ggga(x0, x1, write_out_g))) ---------------------------------------- (654) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_in_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U1_ggga(x0, x1, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (655) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_in_ag(x0))) at position [3,3] we obtained the following new rules [LPAR04]: (U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))),U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0)))) ---------------------------------------- (656) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U1_ggga(x0, x1, write_out_g)) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (657) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U1_ggga(x0, x1, write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U2_ggga(x1, write_in_g(x0))),U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U2_ggga(x1, write_in_g(x0)))) ---------------------------------------- (658) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U2_ggga(x1, write_in_g(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (659) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U2_ggga(x1, write_in_g(x0))) at position [3,1] we obtained the following new rules [LPAR04]: (U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U2_ggga(x1, write_out_g)),U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U2_ggga(x1, write_out_g))) ---------------------------------------- (660) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U2_ggga(x1, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (661) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U2_ggga(x1, write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U3_ggga(x1, write_in_g(' to '))),U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U3_ggga(x1, write_in_g(' to ')))) ---------------------------------------- (662) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U3_ggga(x1, write_in_g(' to '))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (663) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U3_ggga(x1, write_in_g(' to '))) at position [3,1] we obtained the following new rules [LPAR04]: (U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U3_ggga(x1, write_out_g)),U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U3_ggga(x1, write_out_g))) ---------------------------------------- (664) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U3_ggga(x1, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (665) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U3_ggga(x1, write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U4_ggga(write_in_g(x1))),U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U4_ggga(write_in_g(x1)))) ---------------------------------------- (666) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U4_ggga(write_in_g(x1))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (667) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U4_ggga(write_in_g(x1))) at position [3,0] we obtained the following new rules [LPAR04]: (U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U4_ggga(write_out_g)),U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U4_ggga(write_out_g))) ---------------------------------------- (668) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U4_ggga(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (669) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U4_ggga(write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U5_ggga(nl_in_)),U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U5_ggga(nl_in_))) ---------------------------------------- (670) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U5_ggga(nl_in_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (671) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U5_ggga(nl_in_)) at position [3,0] we obtained the following new rules [LPAR04]: (U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U5_ggga(nl_out_)),U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U5_ggga(nl_out_))) ---------------------------------------- (672) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U5_ggga(nl_out_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (673) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), U5_ggga(nl_out_)) at position [3] we obtained the following new rules [LPAR04]: (U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga),U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga)) ---------------------------------------- (674) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (675) TransformationProof (SOUND) By narrowing [LPAR04] the rule U11_GGAG(X, Z, M, move_out_ggga) -> U12_GGAG(X, Z, M, move_in_ggaa(succ(zero), X)) at position [3] we obtained the following new rules [LPAR04]: (U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U1_ggaa(x0, write_in_g('Move top disk from '))),U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U1_ggaa(x0, write_in_g('Move top disk from ')))) (U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_in_ag(succ(zero)))),U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_in_ag(succ(zero))))) ---------------------------------------- (676) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U1_ggaa(x0, write_in_g('Move top disk from '))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_in_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (677) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U1_ggaa(x0, write_in_g('Move top disk from '))) at position [3,1] we obtained the following new rules [LPAR04]: (U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U1_ggaa(x0, write_out_g)),U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U1_ggaa(x0, write_out_g))) ---------------------------------------- (678) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_in_ag(succ(zero)))) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U1_ggaa(x0, write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (679) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_in_ag(succ(zero)))) at position [3,2] we obtained the following new rules [LPAR04]: (U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))),U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero))))) ---------------------------------------- (680) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U1_ggaa(x0, write_out_g)) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (681) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U1_ggaa(x0, write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U2_ggaa(write_in_g(x0))),U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U2_ggaa(write_in_g(x0)))) ---------------------------------------- (682) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U2_ggaa(write_in_g(x0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (683) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U2_ggaa(write_in_g(x0))) at position [3,0] we obtained the following new rules [LPAR04]: (U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U2_ggaa(write_out_g)),U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U2_ggaa(write_out_g))) ---------------------------------------- (684) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U2_ggaa(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (685) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U2_ggaa(write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U3_ggaa(write_in_g(' to '))),U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U3_ggaa(write_in_g(' to ')))) ---------------------------------------- (686) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U3_ggaa(write_in_g(' to '))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (687) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U3_ggaa(write_in_g(' to '))) at position [3,0] we obtained the following new rules [LPAR04]: (U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U3_ggaa(write_out_g)),U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U3_ggaa(write_out_g))) ---------------------------------------- (688) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U3_ggaa(write_out_g)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (689) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U3_ggaa(write_out_g)) at position [3] we obtained the following new rules [LPAR04]: (U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U4_ggaa(write_in_a)),U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U4_ggaa(write_in_a))) ---------------------------------------- (690) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U4_ggaa(write_in_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (691) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U4_ggaa(write_in_a)) at position [3,0] we obtained the following new rules [LPAR04]: (U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U4_ggaa(write_out_a)),U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U4_ggaa(write_out_a))) ---------------------------------------- (692) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U4_ggaa(write_out_a)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (693) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U4_ggaa(write_out_a)) at position [3] we obtained the following new rules [LPAR04]: (U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U5_ggaa(nl_in_)),U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U5_ggaa(nl_in_))) ---------------------------------------- (694) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U5_ggaa(nl_in_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (695) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U5_ggaa(nl_in_)) at position [3,0] we obtained the following new rules [LPAR04]: (U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U5_ggaa(nl_out_)),U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U5_ggaa(nl_out_))) ---------------------------------------- (696) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U5_ggaa(nl_out_)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (697) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, U5_ggaa(nl_out_)) at position [3] we obtained the following new rules [LPAR04]: (U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa),U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa)) ---------------------------------------- (698) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (699) TransformationProof (SOUND) By narrowing [LPAR04] the rule U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGGA(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) at position [3] we obtained the following new rules [LPAR04]: (U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))),U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero)))) ---------------------------------------- (700) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGGA(zero, y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U8_GGGA(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (701) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes. ---------------------------------------- (702) Obligation: Q DP problem: The TRS P consists of the following rules: MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (703) TransformationProof (SOUND) By narrowing [LPAR04] the rule U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GAGG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) at position [3] we obtained the following new rules [LPAR04]: (U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))),U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero)))) ---------------------------------------- (704) Obligation: Q DP problem: The TRS P consists of the following rules: MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U8_GAGG(zero, y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(zero))) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U8_GAGG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (705) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes. ---------------------------------------- (706) Obligation: Q DP problem: The TRS P consists of the following rules: U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (707) TransformationProof (SOUND) By narrowing [LPAR04] the rule U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) -> U8_GGAG(z0, z1, z2, isGreater_in_gg(z0, succ(zero))) at position [3] we obtained the following new rules [LPAR04]: (U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))),U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero)))) ---------------------------------------- (708) Obligation: Q DP problem: The TRS P consists of the following rules: U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U8_GGAG(zero, y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(zero))) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U8_GGAG(pred(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(pred(pred(x0)))) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (709) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes. ---------------------------------------- (710) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (711) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U6_GAGG(z0, z1, z2, =_out_ag(z0)) -> U7_GAGG(z0, z1, z2, z0, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))),U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero)))) ---------------------------------------- (712) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (713) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule MOVE_IN_GAGG(N, Y, Z) -> U6_GAGG(N, Y, Z, =_out_ag(N)) we obtained the following new rules [LPAR04]: (MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))),MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0)))) ---------------------------------------- (714) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (715) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U10_GAGG(Y, Z, =_out_ag(M)) -> MOVE_IN_GAGG(M, Z, Y) we obtained the following new rules [LPAR04]: (U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0),U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0)) ---------------------------------------- (716) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (717) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U6_GGGA(z0, z1, z2, =_out_ag(z0)) -> U7_GGGA(z0, z1, z2, z0, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))),U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero)))) ---------------------------------------- (718) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (719) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule MOVE_IN_GGGA(N, X, Y) -> U6_GGGA(N, X, Y, =_out_ag(N)) we obtained the following new rules [LPAR04]: (MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))),MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0)))) ---------------------------------------- (720) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (721) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U12_GAGG(Y, Z, M, move_out_gaga) -> MOVE_IN_GGGA(M, Z, Y) we obtained the following new rules [LPAR04]: (U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0),U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0)) ---------------------------------------- (722) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (723) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GAGG(x1, y1, y2, move_out_gagg) -> U12_GAGG(x1, y1, y2, U6_gaga(succ(zero), x1, =_out_ag(succ(zero)))) we obtained the following new rules [LPAR04]: (U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))),U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero))))) ---------------------------------------- (724) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (725) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U6_GGAG(z0, z1, z2, =_out_ag(z0)) -> U7_GGAG(z0, z1, z2, z0, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))),U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero)))) ---------------------------------------- (726) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (727) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule MOVE_IN_GGAG(N, X, Z) -> U6_GGAG(N, X, Z, =_out_ag(N)) we obtained the following new rules [LPAR04]: (MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))),MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0)))) ---------------------------------------- (728) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (729) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U10_GGGA(X, Y, =_out_ag(M)) -> MOVE_IN_GGAG(M, X, Y) we obtained the following new rules [LPAR04]: (U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1),U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1)) ---------------------------------------- (730) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (731) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U10_GGAG(X, Z, =_out_ag(M)) -> MOVE_IN_GGGA(M, X, Z) we obtained the following new rules [LPAR04]: (U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1),U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1)) ---------------------------------------- (732) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (733) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U12_GGAG(X, Z, M, move_out_ggaa) -> MOVE_IN_GGAG(M, Z, X) we obtained the following new rules [LPAR04]: (U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0),U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0)) ---------------------------------------- (734) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (735) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GGAG(x1, y1, y2, move_out_ggga) -> U12_GGAG(x1, y1, y2, U6_ggaa(succ(zero), x1, =_out_ag(succ(zero)))) we obtained the following new rules [LPAR04]: (U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))),U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero))))) ---------------------------------------- (736) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (737) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GGAG(x0, y1, y2, move_out_ggga) -> U12_GGAG(x0, y1, y2, move_out_ggaa) we obtained the following new rules [LPAR04]: (U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa),U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa)) ---------------------------------------- (738) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (739) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U10_GGAG(x1, x2, =_out_ag(x0)) -> U11_GGAG(x1, x2, x0, U6_ggga(x0, x1, x2, =_out_ag(x0))) we obtained the following new rules [LPAR04]: (U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))),U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2))))) ---------------------------------------- (740) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (741) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U9_GGAG(X, Z, isMinus_out_gga(U)) -> U10_GGAG(X, Z, =_out_ag(U)) we obtained the following new rules [LPAR04]: (U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))),U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero)))) (U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))),U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2)))) ---------------------------------------- (742) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (743) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U8_GGAG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGAG(y1, y2, isMinus_out_gga(x0)) we obtained the following new rules [LPAR04]: (U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))),U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero)))) (U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))),U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2)))) ---------------------------------------- (744) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (745) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U7_GGAG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGAG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) we obtained the following new rules [LPAR04]: (U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, U47_gg(isGreater_in_gg(succ(zero), zero))),U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, U47_gg(isGreater_in_gg(succ(zero), zero)))) (U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_in_gg(succ(y_0), zero))),U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_in_gg(succ(y_0), zero)))) ---------------------------------------- (746) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, U47_gg(isGreater_in_gg(succ(zero), zero))) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_in_gg(succ(y_0), zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (747) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, U47_gg(isGreater_in_gg(succ(zero), zero))) at position [3,0] we obtained the following new rules [LPAR04]: (U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, U47_gg(isGreater_out_gg)),U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, U47_gg(isGreater_out_gg))) ---------------------------------------- (748) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_in_gg(succ(y_0), zero))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, U47_gg(isGreater_out_gg)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (749) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_in_gg(succ(y_0), zero))) at position [3,0] we obtained the following new rules [LPAR04]: (U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_out_gg)),U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_out_gg))) ---------------------------------------- (750) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, U47_gg(isGreater_out_gg)) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_out_gg)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (751) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, U47_gg(isGreater_out_gg)) at position [3] we obtained the following new rules [LPAR04]: (U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg),U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg)) ---------------------------------------- (752) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_out_gg)) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (753) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_out_gg)) at position [3] we obtained the following new rules [LPAR04]: (U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg),U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg)) ---------------------------------------- (754) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (755) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U12_GGGA(X, Y, M, move_out_ggga) -> MOVE_IN_GAGG(M, Y, X) we obtained the following new rules [LPAR04]: (U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0),U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0)) ---------------------------------------- (756) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg) U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (757) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GGGA(x1, x2, y2, move_out_ggag) -> U12_GGGA(x1, x2, y2, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) we obtained the following new rules [LPAR04]: (U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))),U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero))))) ---------------------------------------- (758) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg) U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (759) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GGGA(x0, x1, y2, move_out_ggag) -> U12_GGGA(x0, x1, y2, move_out_ggga) we obtained the following new rules [LPAR04]: (U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), move_out_ggga),U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), move_out_ggga)) ---------------------------------------- (760) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg) U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), move_out_ggga) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (761) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GAGG(x0, y1, y2, move_out_gagg) -> U12_GAGG(x0, y1, y2, move_out_gaga) we obtained the following new rules [LPAR04]: (U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), move_out_gaga),U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), move_out_gaga)) ---------------------------------------- (762) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg) U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), move_out_ggga) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), move_out_gaga) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (763) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U10_GAGG(x2, x1, =_out_ag(x0)) -> U11_GAGG(x2, x1, x0, U6_gagg(x0, x1, x2, =_out_ag(x0))) we obtained the following new rules [LPAR04]: (U10_GAGG(x0, x1, =_out_ag(succ(y_2))) -> U11_GAGG(x0, x1, succ(y_2), U6_gagg(succ(y_2), x1, x0, =_out_ag(succ(y_2)))),U10_GAGG(x0, x1, =_out_ag(succ(y_2))) -> U11_GAGG(x0, x1, succ(y_2), U6_gagg(succ(y_2), x1, x0, =_out_ag(succ(y_2))))) ---------------------------------------- (764) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg) U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), move_out_ggga) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), move_out_gaga) U10_GAGG(x0, x1, =_out_ag(succ(y_2))) -> U11_GAGG(x0, x1, succ(y_2), U6_gagg(succ(y_2), x1, x0, =_out_ag(succ(y_2)))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (765) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U9_GAGG(Y, Z, isMinus_out_gga(U)) -> U10_GAGG(Y, Z, =_out_ag(U)) we obtained the following new rules [LPAR04]: (U9_GAGG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GAGG(x0, x1, =_out_ag(succ(zero))),U9_GAGG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GAGG(x0, x1, =_out_ag(succ(zero)))) (U9_GAGG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GAGG(x0, x1, =_out_ag(succ(y_2))),U9_GAGG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GAGG(x0, x1, =_out_ag(succ(y_2)))) ---------------------------------------- (766) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg) U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), move_out_ggga) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), move_out_gaga) U10_GAGG(x0, x1, =_out_ag(succ(y_2))) -> U11_GAGG(x0, x1, succ(y_2), U6_gagg(succ(y_2), x1, x0, =_out_ag(succ(y_2)))) U9_GAGG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GAGG(x0, x1, =_out_ag(succ(zero))) U9_GAGG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GAGG(x0, x1, =_out_ag(succ(y_2))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (767) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U8_GAGG(succ(x0), y1, y2, isGreater_out_gg) -> U9_GAGG(y1, y2, isMinus_out_gga(x0)) we obtained the following new rules [LPAR04]: (U8_GAGG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(zero))),U8_GAGG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(zero)))) (U8_GAGG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(y_2))),U8_GAGG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(y_2)))) ---------------------------------------- (768) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg) U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), move_out_ggga) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), move_out_gaga) U10_GAGG(x0, x1, =_out_ag(succ(y_2))) -> U11_GAGG(x0, x1, succ(y_2), U6_gagg(succ(y_2), x1, x0, =_out_ag(succ(y_2)))) U9_GAGG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GAGG(x0, x1, =_out_ag(succ(zero))) U9_GAGG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GAGG(x0, x1, =_out_ag(succ(y_2))) U8_GAGG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(zero))) U8_GAGG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(y_2))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (769) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U7_GAGG(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GAGG(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) we obtained the following new rules [LPAR04]: (U7_GAGG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(zero)), x1, x2, U47_gg(isGreater_in_gg(succ(zero), zero))),U7_GAGG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(zero)), x1, x2, U47_gg(isGreater_in_gg(succ(zero), zero)))) (U7_GAGG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_in_gg(succ(y_0), zero))),U7_GAGG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_in_gg(succ(y_0), zero)))) ---------------------------------------- (770) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg) U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), move_out_ggga) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), move_out_gaga) U10_GAGG(x0, x1, =_out_ag(succ(y_2))) -> U11_GAGG(x0, x1, succ(y_2), U6_gagg(succ(y_2), x1, x0, =_out_ag(succ(y_2)))) U9_GAGG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GAGG(x0, x1, =_out_ag(succ(zero))) U9_GAGG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GAGG(x0, x1, =_out_ag(succ(y_2))) U8_GAGG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(zero))) U8_GAGG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GAGG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(zero)), x1, x2, U47_gg(isGreater_in_gg(succ(zero), zero))) U7_GAGG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_in_gg(succ(y_0), zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (771) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GAGG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(zero)), x1, x2, U47_gg(isGreater_in_gg(succ(zero), zero))) at position [3,0] we obtained the following new rules [LPAR04]: (U7_GAGG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(zero)), x1, x2, U47_gg(isGreater_out_gg)),U7_GAGG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(zero)), x1, x2, U47_gg(isGreater_out_gg))) ---------------------------------------- (772) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg) U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), move_out_ggga) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), move_out_gaga) U10_GAGG(x0, x1, =_out_ag(succ(y_2))) -> U11_GAGG(x0, x1, succ(y_2), U6_gagg(succ(y_2), x1, x0, =_out_ag(succ(y_2)))) U9_GAGG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GAGG(x0, x1, =_out_ag(succ(zero))) U9_GAGG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GAGG(x0, x1, =_out_ag(succ(y_2))) U8_GAGG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(zero))) U8_GAGG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GAGG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_in_gg(succ(y_0), zero))) U7_GAGG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(zero)), x1, x2, U47_gg(isGreater_out_gg)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (773) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GAGG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_in_gg(succ(y_0), zero))) at position [3,0] we obtained the following new rules [LPAR04]: (U7_GAGG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_out_gg)),U7_GAGG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_out_gg))) ---------------------------------------- (774) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg) U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), move_out_ggga) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), move_out_gaga) U10_GAGG(x0, x1, =_out_ag(succ(y_2))) -> U11_GAGG(x0, x1, succ(y_2), U6_gagg(succ(y_2), x1, x0, =_out_ag(succ(y_2)))) U9_GAGG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GAGG(x0, x1, =_out_ag(succ(zero))) U9_GAGG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GAGG(x0, x1, =_out_ag(succ(y_2))) U8_GAGG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(zero))) U8_GAGG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GAGG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(zero)), x1, x2, U47_gg(isGreater_out_gg)) U7_GAGG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_out_gg)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (775) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GAGG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(zero)), x1, x2, U47_gg(isGreater_out_gg)) at position [3] we obtained the following new rules [LPAR04]: (U7_GAGG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(zero)), x1, x2, isGreater_out_gg),U7_GAGG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(zero)), x1, x2, isGreater_out_gg)) ---------------------------------------- (776) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg) U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), move_out_ggga) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), move_out_gaga) U10_GAGG(x0, x1, =_out_ag(succ(y_2))) -> U11_GAGG(x0, x1, succ(y_2), U6_gagg(succ(y_2), x1, x0, =_out_ag(succ(y_2)))) U9_GAGG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GAGG(x0, x1, =_out_ag(succ(zero))) U9_GAGG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GAGG(x0, x1, =_out_ag(succ(y_2))) U8_GAGG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(zero))) U8_GAGG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GAGG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_out_gg)) U7_GAGG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(zero)), x1, x2, isGreater_out_gg) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (777) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GAGG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(y_0)), x1, x2, U47_gg(isGreater_out_gg)) at position [3] we obtained the following new rules [LPAR04]: (U7_GAGG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(y_0)), x1, x2, isGreater_out_gg),U7_GAGG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(y_0)), x1, x2, isGreater_out_gg)) ---------------------------------------- (778) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg) U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), move_out_ggga) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), move_out_gaga) U10_GAGG(x0, x1, =_out_ag(succ(y_2))) -> U11_GAGG(x0, x1, succ(y_2), U6_gagg(succ(y_2), x1, x0, =_out_ag(succ(y_2)))) U9_GAGG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GAGG(x0, x1, =_out_ag(succ(zero))) U9_GAGG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GAGG(x0, x1, =_out_ag(succ(y_2))) U8_GAGG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(zero))) U8_GAGG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GAGG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GAGG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(y_0)), x1, x2, isGreater_out_gg) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (779) QDPOrderProof (EQUIVALENT) We use the reduction pair processor [LPAR04,JAR06]. The following pairs can be oriented strictly and are deleted. U10_GAGG(x1, x0, =_out_ag(succ(zero))) -> U11_GAGG(x1, x0, succ(zero), move_out_gagg) U10_GAGG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U10_GGGA(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGAG(succ(y_0), x0, x1) U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(zero))) U8_GGAG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GGAG(x1, x2, isMinus_out_gga(succ(y_2))) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGA(x0, x1, succ(y_2), move_out_ggag) -> U12_GGGA(x0, x1, succ(y_2), move_out_ggga) U10_GAGG(x0, x1, =_out_ag(succ(y_2))) -> U11_GAGG(x0, x1, succ(y_2), U6_gagg(succ(y_2), x1, x0, =_out_ag(succ(y_2)))) The remaining pairs can at least be oriented weakly. Used ordering: Polynomial interpretation [POLO]: POL(' to ') = 0 POL('Move top disk from ') = 0 POL(=_in_ag(x_1)) = 0 POL(=_out_ag(x_1)) = x_1 POL(MOVE_IN_GAGG(x_1, x_2, x_3)) = x_1 POL(MOVE_IN_GGAG(x_1, x_2, x_3)) = x_1 POL(MOVE_IN_GGGA(x_1, x_2, x_3)) = x_1 POL(U10_GAGG(x_1, x_2, x_3)) = 1 + x_3 POL(U10_GGAG(x_1, x_2, x_3)) = x_3 POL(U10_GGGA(x_1, x_2, x_3)) = 1 + x_3 POL(U10_gaaa(x_1)) = 1 POL(U10_gaag(x_1, x_2)) = x_1 POL(U10_gaga(x_1, x_2)) = x_1 POL(U10_gagg(x_1, x_2, x_3)) = x_1 + x_2 POL(U10_ggaa(x_1, x_2)) = x_1 POL(U10_ggag(x_1, x_2, x_3)) = x_1 + x_2 POL(U10_ggga(x_1, x_2, x_3)) = x_1 + x_2 POL(U11_GAGG(x_1, x_2, x_3, x_4)) = x_3 POL(U11_GGAG(x_1, x_2, x_3, x_4)) = x_3 POL(U11_GGGA(x_1, x_2, x_3, x_4)) = 1 + x_3 POL(U11_gaaa(x_1, x_2)) = x_1 POL(U11_gaag(x_1, x_2, x_3)) = x_1 + x_2 POL(U11_gaga(x_1, x_2, x_3)) = x_1 + x_2 POL(U11_gagg(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U11_ggaa(x_1, x_2, x_3)) = x_1 + x_2 POL(U11_ggag(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U11_ggga(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U12_GAGG(x_1, x_2, x_3, x_4)) = x_3 POL(U12_GGAG(x_1, x_2, x_3, x_4)) = x_3 POL(U12_GGGA(x_1, x_2, x_3, x_4)) = x_3 POL(U12_gaaa(x_1, x_2)) = 1 + x_1 POL(U12_gaag(x_1, x_2, x_3)) = 1 + x_1 + x_2 POL(U12_gaga(x_1, x_2, x_3)) = 1 + x_1 + x_2 POL(U12_gagg(x_1, x_2, x_3, x_4)) = 1 + x_1 + x_2 + x_3 POL(U12_ggaa(x_1, x_2, x_3)) = x_1 + x_2 POL(U12_ggag(x_1, x_2, x_3, x_4)) = 1 + x_1 + x_2 + x_3 POL(U12_ggga(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U13_gaaa(x_1)) = 1 + x_1 POL(U13_gaag(x_1)) = 1 POL(U13_gaga(x_1)) = 1 + x_1 POL(U13_gagg(x_1)) = 1 POL(U13_ggaa(x_1)) = 1 POL(U13_ggag(x_1)) = 1 POL(U13_ggga(x_1)) = 1 POL(U18_gga(x_1)) = 0 POL(U19_gga(x_1)) = 0 POL(U1_gaaa(x_1)) = 1 POL(U1_gaag(x_1)) = 1 POL(U1_gaga(x_1, x_2)) = x_1 POL(U1_gagg(x_1, x_2)) = x_1 POL(U1_ggaa(x_1, x_2)) = x_1 POL(U1_ggag(x_1, x_2)) = 1 + x_1 POL(U1_ggga(x_1, x_2, x_3)) = 1 + x_1 + x_2 POL(U20_gga(x_1)) = 1 POL(U21_gga(x_1)) = 0 POL(U22_gga(x_1)) = 0 POL(U23_gga(x_1)) = 1 POL(U2_gaaa(x_1)) = 0 POL(U2_gaag(x_1)) = 0 POL(U2_gaga(x_1, x_2)) = x_1 POL(U2_gagg(x_1, x_2)) = x_1 POL(U2_ggaa(x_1)) = 0 POL(U2_ggag(x_1)) = 0 POL(U2_ggga(x_1, x_2)) = x_1 POL(U3_gaaa(x_1)) = 0 POL(U3_gaag(x_1)) = 0 POL(U3_gaga(x_1, x_2)) = 1 + x_1 POL(U3_gagg(x_1, x_2)) = 1 + x_1 POL(U3_ggaa(x_1)) = 0 POL(U3_ggag(x_1)) = 0 POL(U3_ggga(x_1, x_2)) = x_1 POL(U47_gg(x_1)) = 0 POL(U48_gg(x_1)) = 1 + x_1 POL(U4_gaaa(x_1)) = 0 POL(U4_gaag(x_1)) = 0 POL(U4_gaga(x_1)) = 0 POL(U4_gagg(x_1)) = 0 POL(U4_ggaa(x_1)) = 0 POL(U4_ggag(x_1)) = 0 POL(U4_ggga(x_1)) = 0 POL(U5_gaaa(x_1)) = 1 POL(U5_gaag(x_1)) = 1 + x_1 POL(U5_gaga(x_1)) = 1 POL(U5_gagg(x_1)) = 1 POL(U5_ggaa(x_1)) = 1 POL(U5_ggag(x_1)) = 1 + x_1 POL(U5_ggga(x_1)) = 1 + x_1 POL(U6_GAGG(x_1, x_2, x_3, x_4)) = x_1 POL(U6_GGAG(x_1, x_2, x_3, x_4)) = x_1 POL(U6_GGGA(x_1, x_2, x_3, x_4)) = x_1 POL(U6_gaaa(x_1, x_2)) = 1 + x_1 POL(U6_gaag(x_1, x_2, x_3)) = 1 + x_1 + x_2 POL(U6_gaga(x_1, x_2, x_3)) = x_2 POL(U6_gagg(x_1, x_2, x_3, x_4)) = x_2 + x_3 POL(U6_ggaa(x_1, x_2, x_3)) = x_2 POL(U6_ggag(x_1, x_2, x_3, x_4)) = x_2 + x_3 POL(U6_ggga(x_1, x_2, x_3, x_4)) = x_2 + x_3 POL(U7_GAGG(x_1, x_2, x_3, x_4, x_5)) = x_1 POL(U7_GGAG(x_1, x_2, x_3, x_4, x_5)) = x_4 POL(U7_GGGA(x_1, x_2, x_3, x_4, x_5)) = x_1 POL(U7_gaaa(x_1, x_2, x_3)) = x_1 + x_2 POL(U7_gaag(x_1, x_2, x_3, x_4)) = 1 + x_1 + x_2 + x_3 POL(U7_gaga(x_1, x_2, x_3, x_4)) = 1 + x_1 + x_2 + x_3 POL(U7_gagg(x_1, x_2, x_3, x_4, x_5)) = x_1 + x_2 + x_3 + x_4 POL(U7_ggaa(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U7_ggag(x_1, x_2, x_3, x_4, x_5)) = x_1 + x_2 + x_3 + x_4 POL(U7_ggga(x_1, x_2, x_3, x_4, x_5)) = 1 + x_1 + x_2 + x_3 + x_4 POL(U8_GAGG(x_1, x_2, x_3, x_4)) = x_1 + x_4 POL(U8_GGAG(x_1, x_2, x_3, x_4)) = x_1 + x_4 POL(U8_GGGA(x_1, x_2, x_3, x_4)) = x_1 POL(U8_gaaa(x_1, x_2)) = x_1 POL(U8_gaag(x_1, x_2, x_3)) = x_1 + x_2 POL(U8_gaga(x_1, x_2, x_3)) = x_1 + x_2 POL(U8_gagg(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U8_ggaa(x_1, x_2, x_3)) = x_1 + x_2 POL(U8_ggag(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U8_ggga(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U9_GAGG(x_1, x_2, x_3)) = 1 + x_3 POL(U9_GGAG(x_1, x_2, x_3)) = x_3 POL(U9_GGGA(x_1, x_2, x_3)) = 1 + x_3 POL(U9_gaaa(x_1)) = 1 POL(U9_gaag(x_1, x_2)) = 1 + x_1 POL(U9_gaga(x_1, x_2)) = 1 + x_1 POL(U9_gagg(x_1, x_2, x_3)) = 1 + x_1 + x_2 POL(U9_ggaa(x_1, x_2)) = 1 + x_1 POL(U9_ggag(x_1, x_2, x_3)) = 1 + x_1 + x_2 POL(U9_ggga(x_1, x_2, x_3)) = x_1 + x_2 POL(isGreater_in_gg(x_1, x_2)) = 0 POL(isGreater_out_gg) = 0 POL(isMinus_in_gga(x_1, x_2)) = 0 POL(isMinus_out_gga(x_1)) = x_1 POL(move_in_gaaa(x_1)) = 0 POL(move_in_gaag(x_1, x_2)) = 0 POL(move_in_gaga(x_1, x_2)) = 0 POL(move_in_gagg(x_1, x_2, x_3)) = 0 POL(move_in_ggaa(x_1, x_2)) = 0 POL(move_in_ggag(x_1, x_2, x_3)) = 0 POL(move_in_ggga(x_1, x_2, x_3)) = 0 POL(move_out_gaaa) = 0 POL(move_out_gaag) = 0 POL(move_out_gaga) = 0 POL(move_out_gagg) = 0 POL(move_out_ggaa) = 0 POL(move_out_ggag) = 0 POL(move_out_ggga) = 0 POL(nl_in_) = 0 POL(nl_out_) = 0 POL(pred(x_1)) = 0 POL(succ(x_1)) = 1 + x_1 POL(write_in_a) = 0 POL(write_in_g(x_1)) = 0 POL(write_out_a) = 0 POL(write_out_g) = 0 POL(zero) = 0 The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented: none ---------------------------------------- (780) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGAG(x0, x1, =_out_ag(succ(zero))) -> U11_GGAG(x0, x1, succ(zero), move_out_ggga) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GAGG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GAGG(succ(y_0), x1, x2) -> U6_GAGG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U12_GAGG(x0, x1, succ(y_0), move_out_gaga) -> MOVE_IN_GGGA(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), U6_gaga(succ(zero), x0, =_out_ag(succ(zero)))) U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGAG(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGAG(succ(y_0), x1, x2) -> U6_GGAG(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U10_GGAG(x0, x1, =_out_ag(succ(y_0))) -> MOVE_IN_GGGA(succ(y_0), x0, x1) U12_GGAG(x0, x1, succ(y_0), move_out_ggaa) -> MOVE_IN_GGAG(succ(y_0), x1, x0) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), U6_ggaa(succ(zero), x0, =_out_ag(succ(zero)))) U11_GGAG(x0, x1, succ(y_2), move_out_ggga) -> U12_GGAG(x0, x1, succ(y_2), move_out_ggaa) U10_GGAG(x0, x1, =_out_ag(succ(y_2))) -> U11_GGAG(x0, x1, succ(y_2), U6_ggga(succ(y_2), x0, x1, =_out_ag(succ(y_2)))) U9_GGAG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GGAG(x0, x1, =_out_ag(succ(zero))) U9_GGAG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GGAG(x0, x1, =_out_ag(succ(y_2))) U7_GGAG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GGAG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGAG(succ(succ(y_0)), x1, x2, isGreater_out_gg) U12_GGGA(x0, x1, succ(y_0), move_out_ggga) -> MOVE_IN_GAGG(succ(y_0), x1, x0) U11_GAGG(x0, x1, succ(y_2), move_out_gagg) -> U12_GAGG(x0, x1, succ(y_2), move_out_gaga) U9_GAGG(x0, x1, isMinus_out_gga(succ(zero))) -> U10_GAGG(x0, x1, =_out_ag(succ(zero))) U9_GAGG(x0, x1, isMinus_out_gga(succ(y_2))) -> U10_GAGG(x0, x1, =_out_ag(succ(y_2))) U8_GAGG(succ(succ(zero)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(zero))) U8_GAGG(succ(succ(y_2)), x1, x2, isGreater_out_gg) -> U9_GAGG(x1, x2, isMinus_out_gga(succ(y_2))) U7_GAGG(succ(succ(zero)), x1, x2, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(zero)), x1, x2, isGreater_out_gg) U7_GAGG(succ(succ(y_0)), x1, x2, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GAGG(succ(succ(y_0)), x1, x2, isGreater_out_gg) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (781) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 24 less nodes. ---------------------------------------- (782) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (783) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule MOVE_IN_GGGA(succ(y_0), x1, x2) -> U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) we obtained the following new rules [LPAR04]: (MOVE_IN_GGGA(succ(zero), z0, z1) -> U6_GGGA(succ(zero), z0, z1, =_out_ag(succ(zero))),MOVE_IN_GGGA(succ(zero), z0, z1) -> U6_GGGA(succ(zero), z0, z1, =_out_ag(succ(zero)))) ---------------------------------------- (784) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) MOVE_IN_GGGA(succ(zero), z0, z1) -> U6_GGGA(succ(zero), z0, z1, =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (785) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U6_GGGA(succ(y_0), x1, x2, =_out_ag(succ(y_0))) -> U7_GGGA(succ(y_0), x1, x2, succ(y_0), =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GGGA(succ(zero), z0, z1, =_out_ag(succ(zero))) -> U7_GGGA(succ(zero), z0, z1, succ(zero), =_out_ag(succ(zero))),U6_GGGA(succ(zero), z0, z1, =_out_ag(succ(zero))) -> U7_GGGA(succ(zero), z0, z1, succ(zero), =_out_ag(succ(zero)))) ---------------------------------------- (786) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) MOVE_IN_GGGA(succ(zero), z0, z1) -> U6_GGGA(succ(zero), z0, z1, =_out_ag(succ(zero))) U6_GGGA(succ(zero), z0, z1, =_out_ag(succ(zero))) -> U7_GGGA(succ(zero), z0, z1, succ(zero), =_out_ag(succ(zero))) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (787) TransformationProof (SOUND) By narrowing [LPAR04] the rule U7_GGGA(succ(x0), y1, y2, succ(x0), =_out_ag(succ(zero))) -> U8_GGGA(succ(x0), y1, y2, U47_gg(isGreater_in_gg(x0, zero))) at position [3,0] we obtained the following new rules [LPAR04]: (U7_GGGA(succ(succ(x0)), y1, y2, succ(succ(x0)), =_out_ag(succ(zero))) -> U8_GGGA(succ(succ(x0)), y1, y2, U47_gg(isGreater_out_gg)),U7_GGGA(succ(succ(x0)), y1, y2, succ(succ(x0)), =_out_ag(succ(zero))) -> U8_GGGA(succ(succ(x0)), y1, y2, U47_gg(isGreater_out_gg))) ---------------------------------------- (788) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGA(succ(x0), y1, y2, isGreater_out_gg) -> U9_GGGA(y1, y2, isMinus_out_gga(x0)) U9_GGGA(X, Y, isMinus_out_gga(U)) -> U10_GGGA(X, Y, =_out_ag(U)) U10_GGGA(x1, x2, =_out_ag(x0)) -> U11_GGGA(x1, x2, x0, U6_ggag(x0, x1, x2, =_out_ag(x0))) U11_GGGA(X, Y, M, move_out_ggag) -> MOVE_IN_GGGA(succ(zero), X, Y) U10_GGGA(x0, x1, =_out_ag(succ(zero))) -> U11_GGGA(x0, x1, succ(zero), move_out_ggag) MOVE_IN_GGGA(succ(zero), z0, z1) -> U6_GGGA(succ(zero), z0, z1, =_out_ag(succ(zero))) U6_GGGA(succ(zero), z0, z1, =_out_ag(succ(zero))) -> U7_GGGA(succ(zero), z0, z1, succ(zero), =_out_ag(succ(zero))) U7_GGGA(succ(succ(x0)), y1, y2, succ(succ(x0)), =_out_ag(succ(zero))) -> U8_GGGA(succ(succ(x0)), y1, y2, U47_gg(isGreater_out_gg)) The TRS R consists of the following rules: isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) =_in_ag(X) -> =_out_ag(X) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U47_gg(isGreater_out_gg) -> isGreater_out_gg U48_gg(isGreater_out_gg) -> isGreater_out_gg U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) write_in_g(X0) -> write_out_g U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U3_ggag(write_out_g) -> U4_ggag(write_in_a) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) write_in_a -> write_out_a U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U4_ggag(write_out_a) -> U5_ggag(nl_in_) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U5_ggag(nl_out_) -> move_out_ggag U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U5_ggga(nl_out_) -> move_out_ggga U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) U5_gagg(nl_out_) -> move_out_gagg U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U5_gaga(nl_out_) -> move_out_gaga U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U5_ggaa(nl_out_) -> move_out_ggaa U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) nl_in_ -> nl_out_ U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) U13_ggag(move_out_ggag) -> move_out_ggag U13_ggga(move_out_gagg) -> move_out_ggga U13_gagg(move_out_ggga) -> move_out_gagg U1_gaag(write_out_g) -> U2_gaag(write_in_a) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U13_gaga(move_out_gaga) -> move_out_gaga U13_ggaa(move_out_gaag) -> move_out_ggaa U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U5_gaag(nl_out_) -> move_out_gaag U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U13_gaag(move_out_ggaa) -> move_out_gaag U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U5_gaaa(nl_out_) -> move_out_gaaa U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa The set Q consists of the following terms: isGreater_in_gg(x0, x1) isMinus_in_gga(x0, x1) =_in_ag(x0) move_in_ggag(x0, x1, x2) move_in_ggga(x0, x1, x2) move_in_gagg(x0, x1, x2) move_in_gaga(x0, x1) move_in_ggaa(x0, x1) U47_gg(x0) U48_gg(x0) U18_gga(x0) U20_gga(x0) U22_gga(x0) U1_ggag(x0, x1) U6_ggag(x0, x1, x2, x3) U1_ggga(x0, x1, x2) U6_ggga(x0, x1, x2, x3) U1_gagg(x0, x1) U6_gagg(x0, x1, x2, x3) U1_gaga(x0, x1) U6_gaga(x0, x1, x2) U1_ggaa(x0, x1) U6_ggaa(x0, x1, x2) write_in_g(x0) U2_ggag(x0) U7_ggag(x0, x1, x2, x3, x4) U2_ggga(x0, x1) U7_ggga(x0, x1, x2, x3, x4) U2_gagg(x0, x1) U7_gagg(x0, x1, x2, x3, x4) U2_gaga(x0, x1) U7_gaga(x0, x1, x2, x3) U2_ggaa(x0) U7_ggaa(x0, x1, x2, x3) U19_gga(x0) U21_gga(x0) U23_gga(x0) U3_ggag(x0) U8_ggag(x0, x1, x2, x3) U3_ggga(x0, x1) U8_ggga(x0, x1, x2, x3) write_in_a U3_gagg(x0, x1) U8_gagg(x0, x1, x2, x3) U3_gaga(x0, x1) U8_gaga(x0, x1, x2) U3_ggaa(x0) U8_ggaa(x0, x1, x2) U4_ggag(x0) U9_ggag(x0, x1, x2) U4_ggga(x0) U9_ggga(x0, x1, x2) U4_gagg(x0) U9_gagg(x0, x1, x2) U4_gaga(x0) U9_gaga(x0, x1) U4_ggaa(x0) U9_ggaa(x0, x1) U5_ggag(x0) U10_ggag(x0, x1, x2) U5_ggga(x0) U10_ggga(x0, x1, x2) U5_gagg(x0) U10_gagg(x0, x1, x2) U5_gaga(x0) U10_gaga(x0, x1) U5_ggaa(x0) U10_ggaa(x0, x1) nl_in_ U11_ggag(x0, x1, x2, x3) U11_ggga(x0, x1, x2, x3) U11_gagg(x0, x1, x2, x3) U11_gaga(x0, x1, x2) U11_ggaa(x0, x1, x2) U12_ggag(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) move_in_gaag(x0, x1) U12_gaga(x0, x1, x2) U12_ggaa(x0, x1, x2) U13_ggag(x0) U13_ggga(x0) U13_gagg(x0) U1_gaag(x0) U6_gaag(x0, x1, x2) U13_gaga(x0) U13_ggaa(x0) U2_gaag(x0) U7_gaag(x0, x1, x2, x3) U3_gaag(x0) U8_gaag(x0, x1, x2) U4_gaag(x0) U9_gaag(x0, x1) U5_gaag(x0) U10_gaag(x0, x1) U11_gaag(x0, x1, x2) U12_gaag(x0, x1, x2) move_in_gaaa(x0) U13_gaag(x0) U1_gaaa(x0) U6_gaaa(x0, x1) U2_gaaa(x0) U7_gaaa(x0, x1, x2) U3_gaaa(x0) U8_gaaa(x0, x1) U4_gaaa(x0) U9_gaaa(x0) U5_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (789) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 8 less nodes. ---------------------------------------- (790) TRUE ---------------------------------------- (791) Obligation: Pi DP problem: The TRS P consists of the following rules: MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_in_ag(X1, N)) U6_GGGG(N, X, Y, Z, =_out_ag(X1, N)) -> U7_GGGG(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_GGGG(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_GGGG(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_GGGG(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_GGGG(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_GGGG(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_GGGG(N, X, Y, Z, =_in_ag(M, U)) U10_GGGG(N, X, Y, Z, =_out_ag(M, U)) -> U11_GGGG(N, X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> U12_GGGG(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U12_GGGG(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(N, X, Y, Z, =_out_ag(M, U)) -> MOVE_IN_GGGG(M, X, Z, Y) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, X1, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g(X0) U1_gggg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gggg(X, Y, X1, write_in_g(X)) U2_gggg(X, Y, X1, write_out_g(X)) -> U3_gggg(X, Y, X1, write_in_g(' to ')) U3_gggg(X, Y, X1, write_out_g(' to ')) -> U4_gggg(X, Y, X1, write_in_g(Y)) U4_gggg(X, Y, X1, write_out_g(Y)) -> U5_gggg(X, Y, X1, nl_in_) nl_in_ -> nl_out_ U5_gggg(X, Y, X1, nl_out_) -> move_out_gggg(succ(zero), X, Y, X1) move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(X1, N)) =_in_ag(X, X) -> =_out_ag(X, X) U6_gggg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gggg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg(succ(X), zero) isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg(succ(X), pred(Y)) isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(X, Y, isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg(zero, pred(Y)) isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(X, Y, isGreater_in_gg(X, Y)) U48_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U47_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U8_gggg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gggg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) isMinus_in_gga(X, zero, X) -> isMinus_out_gga(X, zero, X) isMinus_in_gga(zero, succ(Y), pred(Z)) -> U18_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(zero, pred(Y), succ(Z)) -> U19_gga(Y, Z, isMinus_in_gga(zero, Y, Z)) isMinus_in_gga(succ(X), succ(Y), Z) -> U20_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(succ(X), pred(Y), succ(succ(Z))) -> U21_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), succ(Y), pred(pred(Z))) -> U22_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) isMinus_in_gga(pred(X), pred(Y), Z) -> U23_gga(X, Y, Z, isMinus_in_gga(X, Y, Z)) U23_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), pred(Y), Z) U22_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(pred(X), succ(Y), pred(pred(Z))) U21_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), pred(Y), succ(succ(Z))) U20_gga(X, Y, Z, isMinus_out_gga(X, Y, Z)) -> isMinus_out_gga(succ(X), succ(Y), Z) U19_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, pred(Y), succ(Z)) U18_gga(Y, Z, isMinus_out_gga(zero, Y, Z)) -> isMinus_out_gga(zero, succ(Y), pred(Z)) U9_gggg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gggg(N, X, Y, Z, =_in_ag(M, U)) U10_gggg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gggg(N, X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(N, X, Y, Z, M, move_out_gggg(M, X, Z, Y)) -> U12_gggg(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) move_in_ggga(succ(zero), X, Y, X1) -> U1_ggga(X, Y, X1, write_in_g('Move top disk from ')) U1_ggga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggga(X, Y, X1, write_in_g(X)) U2_ggga(X, Y, X1, write_out_g(X)) -> U3_ggga(X, Y, X1, write_in_g(' to ')) U3_ggga(X, Y, X1, write_out_g(' to ')) -> U4_ggga(X, Y, X1, write_in_g(Y)) U4_ggga(X, Y, X1, write_out_g(Y)) -> U5_ggga(X, Y, X1, nl_in_) U5_ggga(X, Y, X1, nl_out_) -> move_out_ggga(succ(zero), X, Y, X1) move_in_ggga(N, X, Y, Z) -> U6_ggga(N, X, Y, Z, =_in_ag(X1, N)) U6_ggga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggga(N, X, Y, Z, =_in_ag(M, U)) U10_ggga(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggga(N, X, Y, Z, M, move_in_ggag(M, X, Z, Y)) move_in_ggag(succ(zero), X, Y, X1) -> U1_ggag(X, Y, X1, write_in_g('Move top disk from ')) U1_ggag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggag(X, Y, X1, write_in_g(X)) U2_ggag(X, Y, X1, write_out_g(X)) -> U3_ggag(X, Y, X1, write_in_g(' to ')) U3_ggag(X, Y, X1, write_out_g(' to ')) -> U4_ggag(X, Y, X1, write_in_a(Y)) write_in_a(X0) -> write_out_a(X0) U4_ggag(X, Y, X1, write_out_a(Y)) -> U5_ggag(X, Y, X1, nl_in_) U5_ggag(X, Y, X1, nl_out_) -> move_out_ggag(succ(zero), X, Y, X1) move_in_ggag(N, X, Y, Z) -> U6_ggag(N, X, Y, Z, =_in_ag(X1, N)) U6_ggag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggag(N, X, Y, Z, =_in_ag(M, U)) U10_ggag(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggag(N, X, Y, Z, M, move_in_ggga(M, X, Z, Y)) U11_ggag(N, X, Y, Z, M, move_out_ggga(M, X, Z, Y)) -> U12_ggag(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) move_in_ggaa(succ(zero), X, Y, X1) -> U1_ggaa(X, Y, X1, write_in_g('Move top disk from ')) U1_ggaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_ggaa(X, Y, X1, write_in_g(X)) U2_ggaa(X, Y, X1, write_out_g(X)) -> U3_ggaa(X, Y, X1, write_in_g(' to ')) U3_ggaa(X, Y, X1, write_out_g(' to ')) -> U4_ggaa(X, Y, X1, write_in_a(Y)) U4_ggaa(X, Y, X1, write_out_a(Y)) -> U5_ggaa(X, Y, X1, nl_in_) U5_ggaa(X, Y, X1, nl_out_) -> move_out_ggaa(succ(zero), X, Y, X1) move_in_ggaa(N, X, Y, Z) -> U6_ggaa(N, X, Y, Z, =_in_ag(X1, N)) U6_ggaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_ggaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_ggaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_ggaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_ggaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_ggaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_ggaa(N, X, Y, Z, =_in_ag(M, U)) U10_ggaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_ggaa(N, X, Y, Z, M, move_in_ggaa(M, X, Z, Y)) U11_ggaa(N, X, Y, Z, M, move_out_ggaa(M, X, Z, Y)) -> U12_ggaa(N, X, Y, Z, M, move_in_ggaa(succ(zero), X, Y, X2)) U12_ggaa(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggaa(N, X, Y, Z, move_in_gaag(M, Z, Y, X)) move_in_gaag(succ(zero), X, Y, X1) -> U1_gaag(X, Y, X1, write_in_g('Move top disk from ')) U1_gaag(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaag(X, Y, X1, write_in_a(X)) U2_gaag(X, Y, X1, write_out_a(X)) -> U3_gaag(X, Y, X1, write_in_g(' to ')) U3_gaag(X, Y, X1, write_out_g(' to ')) -> U4_gaag(X, Y, X1, write_in_a(Y)) U4_gaag(X, Y, X1, write_out_a(Y)) -> U5_gaag(X, Y, X1, nl_in_) U5_gaag(X, Y, X1, nl_out_) -> move_out_gaag(succ(zero), X, Y, X1) move_in_gaag(N, X, Y, Z) -> U6_gaag(N, X, Y, Z, =_in_ag(X1, N)) U6_gaag(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaag(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaag(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaag(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaag(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaag(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaag(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaag(N, X, Y, Z, =_in_ag(M, U)) U10_gaag(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaag(N, X, Y, Z, M, move_in_gaga(M, X, Z, Y)) move_in_gaga(succ(zero), X, Y, X1) -> U1_gaga(X, Y, X1, write_in_g('Move top disk from ')) U1_gaga(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaga(X, Y, X1, write_in_a(X)) U2_gaga(X, Y, X1, write_out_a(X)) -> U3_gaga(X, Y, X1, write_in_g(' to ')) U3_gaga(X, Y, X1, write_out_g(' to ')) -> U4_gaga(X, Y, X1, write_in_g(Y)) U4_gaga(X, Y, X1, write_out_g(Y)) -> U5_gaga(X, Y, X1, nl_in_) U5_gaga(X, Y, X1, nl_out_) -> move_out_gaga(succ(zero), X, Y, X1) move_in_gaga(N, X, Y, Z) -> U6_gaga(N, X, Y, Z, =_in_ag(X1, N)) U6_gaga(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaga(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaga(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaga(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaga(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaga(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaga(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaga(N, X, Y, Z, =_in_ag(M, U)) U10_gaga(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaga(N, X, Y, Z, M, move_in_gaag(M, X, Z, Y)) U11_gaga(N, X, Y, Z, M, move_out_gaag(M, X, Z, Y)) -> U12_gaga(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gaga(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gaga(N, X, Y, Z, move_in_gaga(M, Z, Y, X)) U13_gaga(N, X, Y, Z, move_out_gaga(M, Z, Y, X)) -> move_out_gaga(N, X, Y, Z) U11_gaag(N, X, Y, Z, M, move_out_gaga(M, X, Z, Y)) -> U12_gaag(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) move_in_gaaa(succ(zero), X, Y, X1) -> U1_gaaa(X, Y, X1, write_in_g('Move top disk from ')) U1_gaaa(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gaaa(X, Y, X1, write_in_a(X)) U2_gaaa(X, Y, X1, write_out_a(X)) -> U3_gaaa(X, Y, X1, write_in_g(' to ')) U3_gaaa(X, Y, X1, write_out_g(' to ')) -> U4_gaaa(X, Y, X1, write_in_a(Y)) U4_gaaa(X, Y, X1, write_out_a(Y)) -> U5_gaaa(X, Y, X1, nl_in_) U5_gaaa(X, Y, X1, nl_out_) -> move_out_gaaa(succ(zero), X, Y, X1) move_in_gaaa(N, X, Y, Z) -> U6_gaaa(N, X, Y, Z, =_in_ag(X1, N)) U6_gaaa(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gaaa(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gaaa(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gaaa(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gaaa(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gaaa(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gaaa(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gaaa(N, X, Y, Z, =_in_ag(M, U)) U10_gaaa(N, X, Y, Z, =_out_ag(M, U)) -> U11_gaaa(N, X, Y, Z, M, move_in_gaaa(M, X, Z, Y)) U11_gaaa(N, X, Y, Z, M, move_out_gaaa(M, X, Z, Y)) -> U12_gaaa(N, X, Y, Z, M, move_in_gaaa(succ(zero), X, Y, X2)) U12_gaaa(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaaa(N, X, Y, Z, move_in_gaaa(M, Z, Y, X)) U13_gaaa(N, X, Y, Z, move_out_gaaa(M, Z, Y, X)) -> move_out_gaaa(N, X, Y, Z) U12_gaag(N, X, Y, Z, M, move_out_gaaa(succ(zero), X, Y, X2)) -> U13_gaag(N, X, Y, Z, move_in_ggaa(M, Z, Y, X)) U13_gaag(N, X, Y, Z, move_out_ggaa(M, Z, Y, X)) -> move_out_gaag(N, X, Y, Z) U13_ggaa(N, X, Y, Z, move_out_gaag(M, Z, Y, X)) -> move_out_ggaa(N, X, Y, Z) U12_ggag(N, X, Y, Z, M, move_out_ggaa(succ(zero), X, Y, X2)) -> U13_ggag(N, X, Y, Z, move_in_ggag(M, Z, Y, X)) U13_ggag(N, X, Y, Z, move_out_ggag(M, Z, Y, X)) -> move_out_ggag(N, X, Y, Z) U11_ggga(N, X, Y, Z, M, move_out_ggag(M, X, Z, Y)) -> U12_ggga(N, X, Y, Z, M, move_in_ggga(succ(zero), X, Y, X2)) U12_ggga(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_ggga(N, X, Y, Z, move_in_gagg(M, Z, Y, X)) move_in_gagg(succ(zero), X, Y, X1) -> U1_gagg(X, Y, X1, write_in_g('Move top disk from ')) U1_gagg(X, Y, X1, write_out_g('Move top disk from ')) -> U2_gagg(X, Y, X1, write_in_a(X)) U2_gagg(X, Y, X1, write_out_a(X)) -> U3_gagg(X, Y, X1, write_in_g(' to ')) U3_gagg(X, Y, X1, write_out_g(' to ')) -> U4_gagg(X, Y, X1, write_in_g(Y)) U4_gagg(X, Y, X1, write_out_g(Y)) -> U5_gagg(X, Y, X1, nl_in_) U5_gagg(X, Y, X1, nl_out_) -> move_out_gagg(succ(zero), X, Y, X1) move_in_gagg(N, X, Y, Z) -> U6_gagg(N, X, Y, Z, =_in_ag(X1, N)) U6_gagg(N, X, Y, Z, =_out_ag(X1, N)) -> U7_gagg(N, X, Y, Z, X1, =_in_ag(X3, succ(zero))) U7_gagg(N, X, Y, Z, X1, =_out_ag(X3, succ(zero))) -> U8_gagg(N, X, Y, Z, X1, X3, isGreater_in_gg(X1, X3)) U8_gagg(N, X, Y, Z, X1, X3, isGreater_out_gg(X1, X3)) -> U9_gagg(N, X, Y, Z, isMinus_in_gga(N, succ(zero), U)) U9_gagg(N, X, Y, Z, isMinus_out_gga(N, succ(zero), U)) -> U10_gagg(N, X, Y, Z, =_in_ag(M, U)) U10_gagg(N, X, Y, Z, =_out_ag(M, U)) -> U11_gagg(N, X, Y, Z, M, move_in_gagg(M, X, Z, Y)) U11_gagg(N, X, Y, Z, M, move_out_gagg(M, X, Z, Y)) -> U12_gagg(N, X, Y, Z, M, move_in_gaga(succ(zero), X, Y, X2)) U12_gagg(N, X, Y, Z, M, move_out_gaga(succ(zero), X, Y, X2)) -> U13_gagg(N, X, Y, Z, move_in_ggga(M, Z, Y, X)) U13_gagg(N, X, Y, Z, move_out_ggga(M, Z, Y, X)) -> move_out_gagg(N, X, Y, Z) U13_ggga(N, X, Y, Z, move_out_gagg(M, Z, Y, X)) -> move_out_ggga(N, X, Y, Z) U12_gggg(N, X, Y, Z, M, move_out_ggga(succ(zero), X, Y, X2)) -> U13_gggg(N, X, Y, Z, move_in_gggg(M, Z, Y, X)) U13_gggg(N, X, Y, Z, move_out_gggg(M, Z, Y, X)) -> move_out_gggg(N, X, Y, Z) The argument filtering Pi contains the following mapping: move_in_gggg(x1, x2, x3, x4) = move_in_gggg(x1, x2, x3, x4) succ(x1) = succ(x1) zero = zero U1_gggg(x1, x2, x3, x4) = U1_gggg(x1, x2, x4) write_in_g(x1) = write_in_g(x1) write_out_g(x1) = write_out_g 'Move top disk from ' = 'Move top disk from ' U2_gggg(x1, x2, x3, x4) = U2_gggg(x2, x4) U3_gggg(x1, x2, x3, x4) = U3_gggg(x2, x4) ' to ' = ' to ' U4_gggg(x1, x2, x3, x4) = U4_gggg(x4) U5_gggg(x1, x2, x3, x4) = U5_gggg(x4) nl_in_ = nl_in_ nl_out_ = nl_out_ move_out_gggg(x1, x2, x3, x4) = move_out_gggg U6_gggg(x1, x2, x3, x4, x5) = U6_gggg(x1, x2, x3, x4, x5) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U7_gggg(x1, x2, x3, x4, x5, x6) = U7_gggg(x1, x2, x3, x4, x5, x6) U8_gggg(x1, x2, x3, x4, x5, x6, x7) = U8_gggg(x1, x2, x3, x4, x7) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U47_gg(x1, x2, x3) = U47_gg(x3) U48_gg(x1, x2, x3) = U48_gg(x3) U9_gggg(x1, x2, x3, x4, x5) = U9_gggg(x2, x3, x4, x5) isMinus_in_gga(x1, x2, x3) = isMinus_in_gga(x1, x2) isMinus_out_gga(x1, x2, x3) = isMinus_out_gga(x3) U18_gga(x1, x2, x3) = U18_gga(x3) U19_gga(x1, x2, x3) = U19_gga(x3) U20_gga(x1, x2, x3, x4) = U20_gga(x4) U21_gga(x1, x2, x3, x4) = U21_gga(x4) U22_gga(x1, x2, x3, x4) = U22_gga(x4) U23_gga(x1, x2, x3, x4) = U23_gga(x4) U10_gggg(x1, x2, x3, x4, x5) = U10_gggg(x2, x3, x4, x5) U11_gggg(x1, x2, x3, x4, x5, x6) = U11_gggg(x2, x3, x4, x5, x6) U12_gggg(x1, x2, x3, x4, x5, x6) = U12_gggg(x2, x3, x4, x5, x6) move_in_ggga(x1, x2, x3, x4) = move_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4) = U1_ggga(x1, x2, x4) U2_ggga(x1, x2, x3, x4) = U2_ggga(x2, x4) U3_ggga(x1, x2, x3, x4) = U3_ggga(x2, x4) U4_ggga(x1, x2, x3, x4) = U4_ggga(x4) U5_ggga(x1, x2, x3, x4) = U5_ggga(x4) move_out_ggga(x1, x2, x3, x4) = move_out_ggga U6_ggga(x1, x2, x3, x4, x5) = U6_ggga(x1, x2, x3, x5) U7_ggga(x1, x2, x3, x4, x5, x6) = U7_ggga(x1, x2, x3, x5, x6) U8_ggga(x1, x2, x3, x4, x5, x6, x7) = U8_ggga(x1, x2, x3, x7) U9_ggga(x1, x2, x3, x4, x5) = U9_ggga(x2, x3, x5) U10_ggga(x1, x2, x3, x4, x5) = U10_ggga(x2, x3, x5) U11_ggga(x1, x2, x3, x4, x5, x6) = U11_ggga(x2, x3, x5, x6) move_in_ggag(x1, x2, x3, x4) = move_in_ggag(x1, x2, x4) U1_ggag(x1, x2, x3, x4) = U1_ggag(x1, x4) U2_ggag(x1, x2, x3, x4) = U2_ggag(x4) U3_ggag(x1, x2, x3, x4) = U3_ggag(x4) U4_ggag(x1, x2, x3, x4) = U4_ggag(x4) write_in_a(x1) = write_in_a write_out_a(x1) = write_out_a U5_ggag(x1, x2, x3, x4) = U5_ggag(x4) move_out_ggag(x1, x2, x3, x4) = move_out_ggag U6_ggag(x1, x2, x3, x4, x5) = U6_ggag(x1, x2, x4, x5) U7_ggag(x1, x2, x3, x4, x5, x6) = U7_ggag(x1, x2, x4, x5, x6) U8_ggag(x1, x2, x3, x4, x5, x6, x7) = U8_ggag(x1, x2, x4, x7) U9_ggag(x1, x2, x3, x4, x5) = U9_ggag(x2, x4, x5) U10_ggag(x1, x2, x3, x4, x5) = U10_ggag(x2, x4, x5) U11_ggag(x1, x2, x3, x4, x5, x6) = U11_ggag(x2, x4, x5, x6) U12_ggag(x1, x2, x3, x4, x5, x6) = U12_ggag(x2, x4, x5, x6) move_in_ggaa(x1, x2, x3, x4) = move_in_ggaa(x1, x2) U1_ggaa(x1, x2, x3, x4) = U1_ggaa(x1, x4) U2_ggaa(x1, x2, x3, x4) = U2_ggaa(x4) U3_ggaa(x1, x2, x3, x4) = U3_ggaa(x4) U4_ggaa(x1, x2, x3, x4) = U4_ggaa(x4) U5_ggaa(x1, x2, x3, x4) = U5_ggaa(x4) move_out_ggaa(x1, x2, x3, x4) = move_out_ggaa U6_ggaa(x1, x2, x3, x4, x5) = U6_ggaa(x1, x2, x5) U7_ggaa(x1, x2, x3, x4, x5, x6) = U7_ggaa(x1, x2, x5, x6) U8_ggaa(x1, x2, x3, x4, x5, x6, x7) = U8_ggaa(x1, x2, x7) U9_ggaa(x1, x2, x3, x4, x5) = U9_ggaa(x2, x5) U10_ggaa(x1, x2, x3, x4, x5) = U10_ggaa(x2, x5) U11_ggaa(x1, x2, x3, x4, x5, x6) = U11_ggaa(x2, x5, x6) U12_ggaa(x1, x2, x3, x4, x5, x6) = U12_ggaa(x2, x5, x6) U13_ggaa(x1, x2, x3, x4, x5) = U13_ggaa(x5) move_in_gaag(x1, x2, x3, x4) = move_in_gaag(x1, x4) U1_gaag(x1, x2, x3, x4) = U1_gaag(x4) U2_gaag(x1, x2, x3, x4) = U2_gaag(x4) U3_gaag(x1, x2, x3, x4) = U3_gaag(x4) U4_gaag(x1, x2, x3, x4) = U4_gaag(x4) U5_gaag(x1, x2, x3, x4) = U5_gaag(x4) move_out_gaag(x1, x2, x3, x4) = move_out_gaag U6_gaag(x1, x2, x3, x4, x5) = U6_gaag(x1, x4, x5) U7_gaag(x1, x2, x3, x4, x5, x6) = U7_gaag(x1, x4, x5, x6) U8_gaag(x1, x2, x3, x4, x5, x6, x7) = U8_gaag(x1, x4, x7) U9_gaag(x1, x2, x3, x4, x5) = U9_gaag(x4, x5) U10_gaag(x1, x2, x3, x4, x5) = U10_gaag(x4, x5) U11_gaag(x1, x2, x3, x4, x5, x6) = U11_gaag(x4, x5, x6) move_in_gaga(x1, x2, x3, x4) = move_in_gaga(x1, x3) U1_gaga(x1, x2, x3, x4) = U1_gaga(x2, x4) U2_gaga(x1, x2, x3, x4) = U2_gaga(x2, x4) U3_gaga(x1, x2, x3, x4) = U3_gaga(x2, x4) U4_gaga(x1, x2, x3, x4) = U4_gaga(x4) U5_gaga(x1, x2, x3, x4) = U5_gaga(x4) move_out_gaga(x1, x2, x3, x4) = move_out_gaga U6_gaga(x1, x2, x3, x4, x5) = U6_gaga(x1, x3, x5) U7_gaga(x1, x2, x3, x4, x5, x6) = U7_gaga(x1, x3, x5, x6) U8_gaga(x1, x2, x3, x4, x5, x6, x7) = U8_gaga(x1, x3, x7) U9_gaga(x1, x2, x3, x4, x5) = U9_gaga(x3, x5) U10_gaga(x1, x2, x3, x4, x5) = U10_gaga(x3, x5) U11_gaga(x1, x2, x3, x4, x5, x6) = U11_gaga(x3, x5, x6) U12_gaga(x1, x2, x3, x4, x5, x6) = U12_gaga(x3, x5, x6) U13_gaga(x1, x2, x3, x4, x5) = U13_gaga(x5) U12_gaag(x1, x2, x3, x4, x5, x6) = U12_gaag(x4, x5, x6) move_in_gaaa(x1, x2, x3, x4) = move_in_gaaa(x1) U1_gaaa(x1, x2, x3, x4) = U1_gaaa(x4) U2_gaaa(x1, x2, x3, x4) = U2_gaaa(x4) U3_gaaa(x1, x2, x3, x4) = U3_gaaa(x4) U4_gaaa(x1, x2, x3, x4) = U4_gaaa(x4) U5_gaaa(x1, x2, x3, x4) = U5_gaaa(x4) move_out_gaaa(x1, x2, x3, x4) = move_out_gaaa U6_gaaa(x1, x2, x3, x4, x5) = U6_gaaa(x1, x5) U7_gaaa(x1, x2, x3, x4, x5, x6) = U7_gaaa(x1, x5, x6) U8_gaaa(x1, x2, x3, x4, x5, x6, x7) = U8_gaaa(x1, x7) U9_gaaa(x1, x2, x3, x4, x5) = U9_gaaa(x5) U10_gaaa(x1, x2, x3, x4, x5) = U10_gaaa(x5) U11_gaaa(x1, x2, x3, x4, x5, x6) = U11_gaaa(x5, x6) U12_gaaa(x1, x2, x3, x4, x5, x6) = U12_gaaa(x5, x6) U13_gaaa(x1, x2, x3, x4, x5) = U13_gaaa(x5) U13_gaag(x1, x2, x3, x4, x5) = U13_gaag(x5) U13_ggag(x1, x2, x3, x4, x5) = U13_ggag(x5) U12_ggga(x1, x2, x3, x4, x5, x6) = U12_ggga(x2, x3, x5, x6) U13_ggga(x1, x2, x3, x4, x5) = U13_ggga(x5) move_in_gagg(x1, x2, x3, x4) = move_in_gagg(x1, x3, x4) U1_gagg(x1, x2, x3, x4) = U1_gagg(x2, x4) U2_gagg(x1, x2, x3, x4) = U2_gagg(x2, x4) U3_gagg(x1, x2, x3, x4) = U3_gagg(x2, x4) U4_gagg(x1, x2, x3, x4) = U4_gagg(x4) U5_gagg(x1, x2, x3, x4) = U5_gagg(x4) move_out_gagg(x1, x2, x3, x4) = move_out_gagg U6_gagg(x1, x2, x3, x4, x5) = U6_gagg(x1, x3, x4, x5) U7_gagg(x1, x2, x3, x4, x5, x6) = U7_gagg(x1, x3, x4, x5, x6) U8_gagg(x1, x2, x3, x4, x5, x6, x7) = U8_gagg(x1, x3, x4, x7) U9_gagg(x1, x2, x3, x4, x5) = U9_gagg(x3, x4, x5) U10_gagg(x1, x2, x3, x4, x5) = U10_gagg(x3, x4, x5) U11_gagg(x1, x2, x3, x4, x5, x6) = U11_gagg(x3, x4, x5, x6) U12_gagg(x1, x2, x3, x4, x5, x6) = U12_gagg(x3, x4, x5, x6) U13_gagg(x1, x2, x3, x4, x5) = U13_gagg(x5) U13_gggg(x1, x2, x3, x4, x5) = U13_gggg(x5) MOVE_IN_GGGG(x1, x2, x3, x4) = MOVE_IN_GGGG(x1, x2, x3, x4) U6_GGGG(x1, x2, x3, x4, x5) = U6_GGGG(x1, x2, x3, x4, x5) U7_GGGG(x1, x2, x3, x4, x5, x6) = U7_GGGG(x1, x2, x3, x4, x5, x6) U8_GGGG(x1, x2, x3, x4, x5, x6, x7) = U8_GGGG(x1, x2, x3, x4, x7) U9_GGGG(x1, x2, x3, x4, x5) = U9_GGGG(x2, x3, x4, x5) U10_GGGG(x1, x2, x3, x4, x5) = U10_GGGG(x2, x3, x4, x5) U11_GGGG(x1, x2, x3, x4, x5, x6) = U11_GGGG(x2, x3, x4, x5, x6) U12_GGGG(x1, x2, x3, x4, x5, x6) = U12_GGGG(x2, x3, x4, x5, x6) We have to consider all (P,R,Pi)-chains ---------------------------------------- (792) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (793) Obligation: Q DP problem: The TRS P consists of the following rules: MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_in_ag(N)) U6_GGGG(N, X, Y, Z, =_out_ag(X1)) -> U7_GGGG(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_GGGG(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_GGGG(N, X, Y, Z, isGreater_in_gg(X1, X3)) U8_GGGG(N, X, Y, Z, isGreater_out_gg) -> U9_GGGG(X, Y, Z, isMinus_in_gga(N, succ(zero))) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_in_ag(U)) U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (794) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_in_ag(N)) at position [4] we obtained the following new rules [LPAR04]: (MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)),MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N))) ---------------------------------------- (795) Obligation: Q DP problem: The TRS P consists of the following rules: U6_GGGG(N, X, Y, Z, =_out_ag(X1)) -> U7_GGGG(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_GGGG(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_GGGG(N, X, Y, Z, isGreater_in_gg(X1, X3)) U8_GGGG(N, X, Y, Z, isGreater_out_gg) -> U9_GGGG(X, Y, Z, isMinus_in_gga(N, succ(zero))) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_in_ag(U)) U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (796) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U6_GGGG(N, X, Y, Z, =_out_ag(X1)) -> U7_GGGG(N, X, Y, Z, X1, =_in_ag(succ(zero))) at position [5] we obtained the following new rules [LPAR04]: (U6_GGGG(N, X, Y, Z, =_out_ag(X1)) -> U7_GGGG(N, X, Y, Z, X1, =_out_ag(succ(zero))),U6_GGGG(N, X, Y, Z, =_out_ag(X1)) -> U7_GGGG(N, X, Y, Z, X1, =_out_ag(succ(zero)))) ---------------------------------------- (797) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGG(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_GGGG(N, X, Y, Z, isGreater_in_gg(X1, X3)) U8_GGGG(N, X, Y, Z, isGreater_out_gg) -> U9_GGGG(X, Y, Z, isMinus_in_gga(N, succ(zero))) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_in_ag(U)) U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U6_GGGG(N, X, Y, Z, =_out_ag(X1)) -> U7_GGGG(N, X, Y, Z, X1, =_out_ag(succ(zero))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (798) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_in_ag(U)) at position [3] we obtained the following new rules [LPAR04]: (U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)),U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U))) ---------------------------------------- (799) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGG(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_GGGG(N, X, Y, Z, isGreater_in_gg(X1, X3)) U8_GGGG(N, X, Y, Z, isGreater_out_gg) -> U9_GGGG(X, Y, Z, isMinus_in_gga(N, succ(zero))) U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U6_GGGG(N, X, Y, Z, =_out_ag(X1)) -> U7_GGGG(N, X, Y, Z, X1, =_out_ag(succ(zero))) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (800) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GGGG(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_GGGG(N, X, Y, Z, isGreater_in_gg(X1, X3)) we obtained the following new rules [LPAR04]: (U7_GGGG(z0, z1, z2, z3, z4, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z4, succ(zero))),U7_GGGG(z0, z1, z2, z3, z4, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z4, succ(zero)))) ---------------------------------------- (801) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGG(N, X, Y, Z, isGreater_out_gg) -> U9_GGGG(X, Y, Z, isMinus_in_gga(N, succ(zero))) U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U6_GGGG(N, X, Y, Z, =_out_ag(X1)) -> U7_GGGG(N, X, Y, Z, X1, =_out_ag(succ(zero))) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U7_GGGG(z0, z1, z2, z3, z4, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z4, succ(zero))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (802) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U6_GGGG(N, X, Y, Z, =_out_ag(X1)) -> U7_GGGG(N, X, Y, Z, X1, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))),U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero)))) ---------------------------------------- (803) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGG(N, X, Y, Z, isGreater_out_gg) -> U9_GGGG(X, Y, Z, isMinus_in_gga(N, succ(zero))) U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U7_GGGG(z0, z1, z2, z3, z4, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z4, succ(zero))) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (804) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U7_GGGG(z0, z1, z2, z3, z4, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z4, succ(zero))) we obtained the following new rules [LPAR04]: (U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))),U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero)))) ---------------------------------------- (805) Obligation: Q DP problem: The TRS P consists of the following rules: U8_GGGG(N, X, Y, Z, isGreater_out_gg) -> U9_GGGG(X, Y, Z, isMinus_in_gga(N, succ(zero))) U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (806) TransformationProof (SOUND) By narrowing [LPAR04] the rule U8_GGGG(N, X, Y, Z, isGreater_out_gg) -> U9_GGGG(X, Y, Z, isMinus_in_gga(N, succ(zero))) at position [3] we obtained the following new rules [LPAR04]: (U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U18_gga(isMinus_in_gga(zero, zero))),U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U18_gga(isMinus_in_gga(zero, zero)))) (U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U20_gga(isMinus_in_gga(x0, zero))),U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U20_gga(isMinus_in_gga(x0, zero)))) (U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U22_gga(isMinus_in_gga(x0, zero))),U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U22_gga(isMinus_in_gga(x0, zero)))) ---------------------------------------- (807) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U18_gga(isMinus_in_gga(zero, zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U20_gga(isMinus_in_gga(x0, zero))) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U22_gga(isMinus_in_gga(x0, zero))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (808) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U18_gga(isMinus_in_gga(zero, zero))) at position [3,0] we obtained the following new rules [LPAR04]: (U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U18_gga(isMinus_out_gga(zero))),U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U18_gga(isMinus_out_gga(zero)))) ---------------------------------------- (809) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U20_gga(isMinus_in_gga(x0, zero))) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U22_gga(isMinus_in_gga(x0, zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U18_gga(isMinus_out_gga(zero))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (810) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U20_gga(isMinus_in_gga(x0, zero))) at position [3,0] we obtained the following new rules [LPAR04]: (U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U20_gga(isMinus_out_gga(x0))),U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U20_gga(isMinus_out_gga(x0)))) ---------------------------------------- (811) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U22_gga(isMinus_in_gga(x0, zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U18_gga(isMinus_out_gga(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U20_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (812) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U22_gga(isMinus_in_gga(x0, zero))) at position [3,0] we obtained the following new rules [LPAR04]: (U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U22_gga(isMinus_out_gga(x0))),U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U22_gga(isMinus_out_gga(x0)))) ---------------------------------------- (813) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U18_gga(isMinus_out_gga(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U20_gga(isMinus_out_gga(x0))) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U22_gga(isMinus_out_gga(x0))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (814) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U18_gga(isMinus_out_gga(zero))) at position [3] we obtained the following new rules [LPAR04]: (U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))),U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero)))) ---------------------------------------- (815) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U20_gga(isMinus_out_gga(x0))) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U22_gga(isMinus_out_gga(x0))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (816) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U20_gga(isMinus_out_gga(x0))) at position [3] we obtained the following new rules [LPAR04]: (U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)),U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0))) ---------------------------------------- (817) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U22_gga(isMinus_out_gga(x0))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (818) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, U22_gga(isMinus_out_gga(x0))) at position [3] we obtained the following new rules [LPAR04]: (U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))),U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0))))) ---------------------------------------- (819) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (820) TransformationProof (SOUND) By narrowing [LPAR04] the rule U10_GGGG(X, Y, Z, =_out_ag(M)) -> U11_GGGG(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) at position [4] we obtained the following new rules [LPAR04]: (U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U1_gggg(x0, x1, write_in_g('Move top disk from '))),U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U1_gggg(x0, x1, write_in_g('Move top disk from ')))) (U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_in_ag(x0))),U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_in_ag(x0)))) ---------------------------------------- (821) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U1_gggg(x0, x1, write_in_g('Move top disk from '))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_in_ag(x0))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (822) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U1_gggg(x0, x1, write_in_g('Move top disk from '))) at position [4,2] we obtained the following new rules [LPAR04]: (U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U1_gggg(x0, x1, write_out_g)),U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U1_gggg(x0, x1, write_out_g))) ---------------------------------------- (823) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_in_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U1_gggg(x0, x1, write_out_g)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (824) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_in_ag(x0))) at position [4,4] we obtained the following new rules [LPAR04]: (U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))),U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0)))) ---------------------------------------- (825) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U1_gggg(x0, x1, write_out_g)) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (826) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U1_gggg(x0, x1, write_out_g)) at position [4] we obtained the following new rules [LPAR04]: (U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U2_gggg(x1, write_in_g(x0))),U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U2_gggg(x1, write_in_g(x0)))) ---------------------------------------- (827) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U2_gggg(x1, write_in_g(x0))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (828) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U2_gggg(x1, write_in_g(x0))) at position [4,1] we obtained the following new rules [LPAR04]: (U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U2_gggg(x1, write_out_g)),U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U2_gggg(x1, write_out_g))) ---------------------------------------- (829) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U2_gggg(x1, write_out_g)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (830) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U2_gggg(x1, write_out_g)) at position [4] we obtained the following new rules [LPAR04]: (U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U3_gggg(x1, write_in_g(' to '))),U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U3_gggg(x1, write_in_g(' to ')))) ---------------------------------------- (831) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U3_gggg(x1, write_in_g(' to '))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (832) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U3_gggg(x1, write_in_g(' to '))) at position [4,1] we obtained the following new rules [LPAR04]: (U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U3_gggg(x1, write_out_g)),U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U3_gggg(x1, write_out_g))) ---------------------------------------- (833) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U3_gggg(x1, write_out_g)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (834) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U3_gggg(x1, write_out_g)) at position [4] we obtained the following new rules [LPAR04]: (U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U4_gggg(write_in_g(x1))),U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U4_gggg(write_in_g(x1)))) ---------------------------------------- (835) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U4_gggg(write_in_g(x1))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (836) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U4_gggg(write_in_g(x1))) at position [4,0] we obtained the following new rules [LPAR04]: (U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U4_gggg(write_out_g)),U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U4_gggg(write_out_g))) ---------------------------------------- (837) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U4_gggg(write_out_g)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (838) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U4_gggg(write_out_g)) at position [4] we obtained the following new rules [LPAR04]: (U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U5_gggg(nl_in_)),U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U5_gggg(nl_in_))) ---------------------------------------- (839) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U5_gggg(nl_in_)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (840) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U5_gggg(nl_in_)) at position [4,0] we obtained the following new rules [LPAR04]: (U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U5_gggg(nl_out_)),U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U5_gggg(nl_out_))) ---------------------------------------- (841) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U5_gggg(nl_out_)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (842) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), U5_gggg(nl_out_)) at position [4] we obtained the following new rules [LPAR04]: (U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg),U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg)) ---------------------------------------- (843) Obligation: Q DP problem: The TRS P consists of the following rules: U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (844) TransformationProof (SOUND) By narrowing [LPAR04] the rule U11_GGGG(X, Y, Z, M, move_out_gggg) -> U12_GGGG(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) at position [4] we obtained the following new rules [LPAR04]: (U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U1_ggga(x0, x1, write_in_g('Move top disk from '))),U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U1_ggga(x0, x1, write_in_g('Move top disk from ')))) (U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_in_ag(succ(zero)))),U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_in_ag(succ(zero))))) ---------------------------------------- (845) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U1_ggga(x0, x1, write_in_g('Move top disk from '))) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_in_ag(succ(zero)))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (846) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U1_ggga(x0, x1, write_in_g('Move top disk from '))) at position [4,2] we obtained the following new rules [LPAR04]: (U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U1_ggga(x0, x1, write_out_g)),U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U1_ggga(x0, x1, write_out_g))) ---------------------------------------- (847) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_in_ag(succ(zero)))) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U1_ggga(x0, x1, write_out_g)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (848) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_in_ag(succ(zero)))) at position [4,3] we obtained the following new rules [LPAR04]: (U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))),U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero))))) ---------------------------------------- (849) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U1_ggga(x0, x1, write_out_g)) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (850) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U1_ggga(x0, x1, write_out_g)) at position [4] we obtained the following new rules [LPAR04]: (U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U2_ggga(x1, write_in_g(x0))),U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U2_ggga(x1, write_in_g(x0)))) ---------------------------------------- (851) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U2_ggga(x1, write_in_g(x0))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (852) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U2_ggga(x1, write_in_g(x0))) at position [4,1] we obtained the following new rules [LPAR04]: (U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U2_ggga(x1, write_out_g)),U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U2_ggga(x1, write_out_g))) ---------------------------------------- (853) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U2_ggga(x1, write_out_g)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (854) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U2_ggga(x1, write_out_g)) at position [4] we obtained the following new rules [LPAR04]: (U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U3_ggga(x1, write_in_g(' to '))),U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U3_ggga(x1, write_in_g(' to ')))) ---------------------------------------- (855) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U3_ggga(x1, write_in_g(' to '))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (856) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U3_ggga(x1, write_in_g(' to '))) at position [4,1] we obtained the following new rules [LPAR04]: (U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U3_ggga(x1, write_out_g)),U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U3_ggga(x1, write_out_g))) ---------------------------------------- (857) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U3_ggga(x1, write_out_g)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (858) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U3_ggga(x1, write_out_g)) at position [4] we obtained the following new rules [LPAR04]: (U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U4_ggga(write_in_g(x1))),U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U4_ggga(write_in_g(x1)))) ---------------------------------------- (859) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U4_ggga(write_in_g(x1))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (860) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U4_ggga(write_in_g(x1))) at position [4,0] we obtained the following new rules [LPAR04]: (U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U4_ggga(write_out_g)),U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U4_ggga(write_out_g))) ---------------------------------------- (861) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U4_ggga(write_out_g)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (862) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U4_ggga(write_out_g)) at position [4] we obtained the following new rules [LPAR04]: (U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U5_ggga(nl_in_)),U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U5_ggga(nl_in_))) ---------------------------------------- (863) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U5_ggga(nl_in_)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (864) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U5_ggga(nl_in_)) at position [4,0] we obtained the following new rules [LPAR04]: (U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U5_ggga(nl_out_)),U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U5_ggga(nl_out_))) ---------------------------------------- (865) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U5_ggga(nl_out_)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (866) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, U5_ggga(nl_out_)) at position [4] we obtained the following new rules [LPAR04]: (U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, move_out_ggga),U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, move_out_ggga)) ---------------------------------------- (867) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, move_out_ggga) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (868) TransformationProof (SOUND) By narrowing [LPAR04] the rule U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) -> U8_GGGG(z0, z1, z2, z3, isGreater_in_gg(z0, succ(zero))) at position [4] we obtained the following new rules [LPAR04]: (U7_GGGG(succ(x0), y1, y2, y3, succ(x0), =_out_ag(succ(zero))) -> U8_GGGG(succ(x0), y1, y2, y3, U47_gg(isGreater_in_gg(x0, zero))),U7_GGGG(succ(x0), y1, y2, y3, succ(x0), =_out_ag(succ(zero))) -> U8_GGGG(succ(x0), y1, y2, y3, U47_gg(isGreater_in_gg(x0, zero)))) ---------------------------------------- (869) Obligation: Q DP problem: The TRS P consists of the following rules: U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U8_GGGG(zero, y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U8_GGGG(pred(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(pred(pred(x0)))) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, move_out_ggga) U7_GGGG(succ(x0), y1, y2, y3, succ(x0), =_out_ag(succ(zero))) -> U8_GGGG(succ(x0), y1, y2, y3, U47_gg(isGreater_in_gg(x0, zero))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (870) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes. ---------------------------------------- (871) Obligation: Q DP problem: The TRS P consists of the following rules: MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) U7_GGGG(succ(x0), y1, y2, y3, succ(x0), =_out_ag(succ(zero))) -> U8_GGGG(succ(x0), y1, y2, y3, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, move_out_ggga) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (872) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U6_GGGG(z0, z1, z2, z3, =_out_ag(z0)) -> U7_GGGG(z0, z1, z2, z3, z0, =_out_ag(succ(zero))) we obtained the following new rules [LPAR04]: (U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))),U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero)))) ---------------------------------------- (873) Obligation: Q DP problem: The TRS P consists of the following rules: MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) U7_GGGG(succ(x0), y1, y2, y3, succ(x0), =_out_ag(succ(zero))) -> U8_GGGG(succ(x0), y1, y2, y3, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, move_out_ggga) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (874) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule MOVE_IN_GGGG(N, X, Y, Z) -> U6_GGGG(N, X, Y, Z, =_out_ag(N)) we obtained the following new rules [LPAR04]: (MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))),MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0)))) ---------------------------------------- (875) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGG(succ(x0), y1, y2, y3, succ(x0), =_out_ag(succ(zero))) -> U8_GGGG(succ(x0), y1, y2, y3, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, move_out_ggga) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (876) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U10_GGGG(X, Y, Z, =_out_ag(M)) -> MOVE_IN_GGGG(M, X, Z, Y) we obtained the following new rules [LPAR04]: (U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1),U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1)) ---------------------------------------- (877) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGG(succ(x0), y1, y2, y3, succ(x0), =_out_ag(succ(zero))) -> U8_GGGG(succ(x0), y1, y2, y3, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, move_out_ggga) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (878) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U12_GGGG(X, Y, Z, M, move_out_ggga) -> MOVE_IN_GGGG(M, Z, Y, X) we obtained the following new rules [LPAR04]: (U12_GGGG(x0, x1, x2, succ(y_0), move_out_ggga) -> MOVE_IN_GGGG(succ(y_0), x2, x1, x0),U12_GGGG(x0, x1, x2, succ(y_0), move_out_ggga) -> MOVE_IN_GGGG(succ(y_0), x2, x1, x0)) ---------------------------------------- (879) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGG(succ(x0), y1, y2, y3, succ(x0), =_out_ag(succ(zero))) -> U8_GGGG(succ(x0), y1, y2, y3, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, move_out_ggga) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1) U12_GGGG(x0, x1, x2, succ(y_0), move_out_ggga) -> MOVE_IN_GGGG(succ(y_0), x2, x1, x0) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (880) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GGGG(x1, x2, y2, y3, move_out_gggg) -> U12_GGGG(x1, x2, y2, y3, U6_ggga(succ(zero), x1, x2, =_out_ag(succ(zero)))) we obtained the following new rules [LPAR04]: (U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))),U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero))))) ---------------------------------------- (881) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGG(succ(x0), y1, y2, y3, succ(x0), =_out_ag(succ(zero))) -> U8_GGGG(succ(x0), y1, y2, y3, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, move_out_ggga) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1) U12_GGGG(x0, x1, x2, succ(y_0), move_out_ggga) -> MOVE_IN_GGGG(succ(y_0), x2, x1, x0) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (882) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U11_GGGG(x0, x1, y2, y3, move_out_gggg) -> U12_GGGG(x0, x1, y2, y3, move_out_ggga) we obtained the following new rules [LPAR04]: (U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), move_out_ggga),U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), move_out_ggga)) ---------------------------------------- (883) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGG(succ(x0), y1, y2, y3, succ(x0), =_out_ag(succ(zero))) -> U8_GGGG(succ(x0), y1, y2, y3, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1) U12_GGGG(x0, x1, x2, succ(y_0), move_out_ggga) -> MOVE_IN_GGGG(succ(y_0), x2, x1, x0) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), move_out_ggga) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (884) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U10_GGGG(x1, x3, x2, =_out_ag(x0)) -> U11_GGGG(x1, x3, x2, x0, U6_gggg(x0, x1, x2, x3, =_out_ag(x0))) we obtained the following new rules [LPAR04]: (U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) -> U11_GGGG(x0, x1, x2, succ(y_3), U6_gggg(succ(y_3), x0, x2, x1, =_out_ag(succ(y_3)))),U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) -> U11_GGGG(x0, x1, x2, succ(y_3), U6_gggg(succ(y_3), x0, x2, x1, =_out_ag(succ(y_3))))) ---------------------------------------- (885) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGG(succ(x0), y1, y2, y3, succ(x0), =_out_ag(succ(zero))) -> U8_GGGG(succ(x0), y1, y2, y3, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1) U12_GGGG(x0, x1, x2, succ(y_0), move_out_ggga) -> MOVE_IN_GGGG(succ(y_0), x2, x1, x0) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), move_out_ggga) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) -> U11_GGGG(x0, x1, x2, succ(y_3), U6_gggg(succ(y_3), x0, x2, x1, =_out_ag(succ(y_3)))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (886) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U9_GGGG(X, Y, Z, isMinus_out_gga(U)) -> U10_GGGG(X, Y, Z, =_out_ag(U)) we obtained the following new rules [LPAR04]: (U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(zero))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(zero))),U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(zero))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(zero)))) (U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(y_3))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))),U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(y_3))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3)))) ---------------------------------------- (887) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGG(succ(x0), y1, y2, y3, succ(x0), =_out_ag(succ(zero))) -> U8_GGGG(succ(x0), y1, y2, y3, U47_gg(isGreater_in_gg(x0, zero))) U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1) U12_GGGG(x0, x1, x2, succ(y_0), move_out_ggga) -> MOVE_IN_GGGG(succ(y_0), x2, x1, x0) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), move_out_ggga) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) -> U11_GGGG(x0, x1, x2, succ(y_3), U6_gggg(succ(y_3), x0, x2, x1, =_out_ag(succ(y_3)))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(zero))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(zero))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(y_3))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (888) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U8_GGGG(succ(x0), y1, y2, y3, isGreater_out_gg) -> U9_GGGG(y1, y2, y3, isMinus_out_gga(x0)) we obtained the following new rules [LPAR04]: (U8_GGGG(succ(succ(zero)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(zero))),U8_GGGG(succ(succ(zero)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(zero)))) (U8_GGGG(succ(succ(y_3)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(y_3))),U8_GGGG(succ(succ(y_3)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(y_3)))) ---------------------------------------- (889) Obligation: Q DP problem: The TRS P consists of the following rules: U7_GGGG(succ(x0), y1, y2, y3, succ(x0), =_out_ag(succ(zero))) -> U8_GGGG(succ(x0), y1, y2, y3, U47_gg(isGreater_in_gg(x0, zero))) U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1) U12_GGGG(x0, x1, x2, succ(y_0), move_out_ggga) -> MOVE_IN_GGGG(succ(y_0), x2, x1, x0) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), move_out_ggga) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) -> U11_GGGG(x0, x1, x2, succ(y_3), U6_gggg(succ(y_3), x0, x2, x1, =_out_ag(succ(y_3)))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(zero))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(zero))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(y_3))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) U8_GGGG(succ(succ(zero)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(zero))) U8_GGGG(succ(succ(y_3)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(y_3))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (890) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule U7_GGGG(succ(x0), y1, y2, y3, succ(x0), =_out_ag(succ(zero))) -> U8_GGGG(succ(x0), y1, y2, y3, U47_gg(isGreater_in_gg(x0, zero))) we obtained the following new rules [LPAR04]: (U7_GGGG(succ(succ(zero)), x1, x2, x3, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(zero)), x1, x2, x3, U47_gg(isGreater_in_gg(succ(zero), zero))),U7_GGGG(succ(succ(zero)), x1, x2, x3, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(zero)), x1, x2, x3, U47_gg(isGreater_in_gg(succ(zero), zero)))) (U7_GGGG(succ(succ(y_0)), x1, x2, x3, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(y_0)), x1, x2, x3, U47_gg(isGreater_in_gg(succ(y_0), zero))),U7_GGGG(succ(succ(y_0)), x1, x2, x3, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(y_0)), x1, x2, x3, U47_gg(isGreater_in_gg(succ(y_0), zero)))) ---------------------------------------- (891) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1) U12_GGGG(x0, x1, x2, succ(y_0), move_out_ggga) -> MOVE_IN_GGGG(succ(y_0), x2, x1, x0) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), move_out_ggga) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) -> U11_GGGG(x0, x1, x2, succ(y_3), U6_gggg(succ(y_3), x0, x2, x1, =_out_ag(succ(y_3)))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(zero))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(zero))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(y_3))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) U8_GGGG(succ(succ(zero)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(zero))) U8_GGGG(succ(succ(y_3)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(y_3))) U7_GGGG(succ(succ(zero)), x1, x2, x3, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(zero)), x1, x2, x3, U47_gg(isGreater_in_gg(succ(zero), zero))) U7_GGGG(succ(succ(y_0)), x1, x2, x3, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(y_0)), x1, x2, x3, U47_gg(isGreater_in_gg(succ(y_0), zero))) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (892) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GGGG(succ(succ(zero)), x1, x2, x3, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(zero)), x1, x2, x3, U47_gg(isGreater_in_gg(succ(zero), zero))) at position [4,0] we obtained the following new rules [LPAR04]: (U7_GGGG(succ(succ(zero)), x1, x2, x3, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(zero)), x1, x2, x3, U47_gg(isGreater_out_gg)),U7_GGGG(succ(succ(zero)), x1, x2, x3, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(zero)), x1, x2, x3, U47_gg(isGreater_out_gg))) ---------------------------------------- (893) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1) U12_GGGG(x0, x1, x2, succ(y_0), move_out_ggga) -> MOVE_IN_GGGG(succ(y_0), x2, x1, x0) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), move_out_ggga) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) -> U11_GGGG(x0, x1, x2, succ(y_3), U6_gggg(succ(y_3), x0, x2, x1, =_out_ag(succ(y_3)))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(zero))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(zero))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(y_3))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) U8_GGGG(succ(succ(zero)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(zero))) U8_GGGG(succ(succ(y_3)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(y_3))) U7_GGGG(succ(succ(y_0)), x1, x2, x3, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(y_0)), x1, x2, x3, U47_gg(isGreater_in_gg(succ(y_0), zero))) U7_GGGG(succ(succ(zero)), x1, x2, x3, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(zero)), x1, x2, x3, U47_gg(isGreater_out_gg)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (894) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GGGG(succ(succ(y_0)), x1, x2, x3, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(y_0)), x1, x2, x3, U47_gg(isGreater_in_gg(succ(y_0), zero))) at position [4,0] we obtained the following new rules [LPAR04]: (U7_GGGG(succ(succ(y_0)), x1, x2, x3, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(y_0)), x1, x2, x3, U47_gg(isGreater_out_gg)),U7_GGGG(succ(succ(y_0)), x1, x2, x3, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(y_0)), x1, x2, x3, U47_gg(isGreater_out_gg))) ---------------------------------------- (895) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1) U12_GGGG(x0, x1, x2, succ(y_0), move_out_ggga) -> MOVE_IN_GGGG(succ(y_0), x2, x1, x0) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), move_out_ggga) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) -> U11_GGGG(x0, x1, x2, succ(y_3), U6_gggg(succ(y_3), x0, x2, x1, =_out_ag(succ(y_3)))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(zero))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(zero))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(y_3))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) U8_GGGG(succ(succ(zero)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(zero))) U8_GGGG(succ(succ(y_3)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(y_3))) U7_GGGG(succ(succ(zero)), x1, x2, x3, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(zero)), x1, x2, x3, U47_gg(isGreater_out_gg)) U7_GGGG(succ(succ(y_0)), x1, x2, x3, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(y_0)), x1, x2, x3, U47_gg(isGreater_out_gg)) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (896) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GGGG(succ(succ(zero)), x1, x2, x3, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(zero)), x1, x2, x3, U47_gg(isGreater_out_gg)) at position [4] we obtained the following new rules [LPAR04]: (U7_GGGG(succ(succ(zero)), x1, x2, x3, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(zero)), x1, x2, x3, isGreater_out_gg),U7_GGGG(succ(succ(zero)), x1, x2, x3, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(zero)), x1, x2, x3, isGreater_out_gg)) ---------------------------------------- (897) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1) U12_GGGG(x0, x1, x2, succ(y_0), move_out_ggga) -> MOVE_IN_GGGG(succ(y_0), x2, x1, x0) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), move_out_ggga) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) -> U11_GGGG(x0, x1, x2, succ(y_3), U6_gggg(succ(y_3), x0, x2, x1, =_out_ag(succ(y_3)))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(zero))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(zero))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(y_3))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) U8_GGGG(succ(succ(zero)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(zero))) U8_GGGG(succ(succ(y_3)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(y_3))) U7_GGGG(succ(succ(y_0)), x1, x2, x3, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(y_0)), x1, x2, x3, U47_gg(isGreater_out_gg)) U7_GGGG(succ(succ(zero)), x1, x2, x3, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(zero)), x1, x2, x3, isGreater_out_gg) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (898) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule U7_GGGG(succ(succ(y_0)), x1, x2, x3, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(y_0)), x1, x2, x3, U47_gg(isGreater_out_gg)) at position [4] we obtained the following new rules [LPAR04]: (U7_GGGG(succ(succ(y_0)), x1, x2, x3, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(y_0)), x1, x2, x3, isGreater_out_gg),U7_GGGG(succ(succ(y_0)), x1, x2, x3, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(y_0)), x1, x2, x3, isGreater_out_gg)) ---------------------------------------- (899) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1) U12_GGGG(x0, x1, x2, succ(y_0), move_out_ggga) -> MOVE_IN_GGGG(succ(y_0), x2, x1, x0) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), move_out_ggga) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) -> U11_GGGG(x0, x1, x2, succ(y_3), U6_gggg(succ(y_3), x0, x2, x1, =_out_ag(succ(y_3)))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(zero))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(zero))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(y_3))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) U8_GGGG(succ(succ(zero)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(zero))) U8_GGGG(succ(succ(y_3)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(y_3))) U7_GGGG(succ(succ(zero)), x1, x2, x3, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(zero)), x1, x2, x3, isGreater_out_gg) U7_GGGG(succ(succ(y_0)), x1, x2, x3, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(y_0)), x1, x2, x3, isGreater_out_gg) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (900) QDPOrderProof (EQUIVALENT) We use the reduction pair processor [LPAR04,JAR06]. The following pairs can be oriented strictly and are deleted. U8_GGGG(succ(succ(zero)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(zero))) U8_GGGG(succ(succ(y_3)), x1, x2, x3, isGreater_out_gg) -> U9_GGGG(x1, x2, x3, isMinus_out_gga(succ(y_3))) The remaining pairs can at least be oriented weakly. Used ordering: Polynomial interpretation [POLO]: POL(' to ') = 0 POL('Move top disk from ') = 0 POL(=_in_ag(x_1)) = 0 POL(=_out_ag(x_1)) = x_1 POL(MOVE_IN_GGGG(x_1, x_2, x_3, x_4)) = x_1 POL(U10_GGGG(x_1, x_2, x_3, x_4)) = x_4 POL(U10_gaaa(x_1)) = 0 POL(U10_gaag(x_1, x_2)) = x_1 POL(U10_gaga(x_1, x_2)) = x_1 POL(U10_gagg(x_1, x_2, x_3)) = x_1 + x_2 POL(U10_ggaa(x_1, x_2)) = x_1 POL(U10_ggag(x_1, x_2, x_3)) = x_1 + x_2 POL(U10_ggga(x_1, x_2, x_3)) = x_1 + x_2 POL(U10_gggg(x_1, x_2, x_3, x_4)) = 1 + x_1 + x_2 + x_3 POL(U11_GGGG(x_1, x_2, x_3, x_4, x_5)) = x_4 POL(U11_gaaa(x_1, x_2)) = x_1 POL(U11_gaag(x_1, x_2, x_3)) = x_1 + x_2 POL(U11_gaga(x_1, x_2, x_3)) = x_1 + x_2 POL(U11_gagg(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U11_ggaa(x_1, x_2, x_3)) = x_1 + x_2 POL(U11_ggag(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U11_ggga(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U11_gggg(x_1, x_2, x_3, x_4, x_5)) = x_1 + x_2 + x_3 + x_4 POL(U12_GGGG(x_1, x_2, x_3, x_4, x_5)) = x_4 POL(U12_gaaa(x_1, x_2)) = 1 + x_1 POL(U12_gaag(x_1, x_2, x_3)) = 1 + x_1 + x_2 POL(U12_gaga(x_1, x_2, x_3)) = 1 + x_1 + x_2 POL(U12_gagg(x_1, x_2, x_3, x_4)) = 1 + x_1 + x_2 + x_3 POL(U12_ggaa(x_1, x_2, x_3)) = x_1 + x_2 POL(U12_ggag(x_1, x_2, x_3, x_4)) = 1 + x_1 + x_2 + x_3 POL(U12_ggga(x_1, x_2, x_3, x_4)) = 1 + x_1 + x_2 + x_3 POL(U12_gggg(x_1, x_2, x_3, x_4, x_5)) = 1 + x_1 + x_2 + x_3 + x_4 POL(U13_gaaa(x_1)) = 1 + x_1 POL(U13_gaag(x_1)) = 1 POL(U13_gaga(x_1)) = 1 + x_1 POL(U13_gagg(x_1)) = 1 POL(U13_ggaa(x_1)) = 1 POL(U13_ggag(x_1)) = 1 POL(U13_ggga(x_1)) = 1 + x_1 POL(U13_gggg(x_1)) = 1 POL(U18_gga(x_1)) = 0 POL(U19_gga(x_1)) = 1 POL(U1_gaaa(x_1)) = 0 POL(U1_gaag(x_1)) = 0 POL(U1_gaga(x_1, x_2)) = x_1 POL(U1_gagg(x_1, x_2)) = x_1 POL(U1_ggaa(x_1, x_2)) = x_1 POL(U1_ggag(x_1, x_2)) = 1 + x_1 POL(U1_ggga(x_1, x_2, x_3)) = x_1 + x_2 POL(U1_gggg(x_1, x_2, x_3)) = x_1 + x_2 POL(U20_gga(x_1)) = 1 POL(U21_gga(x_1)) = 1 POL(U22_gga(x_1)) = 1 POL(U23_gga(x_1)) = 1 POL(U2_gaaa(x_1)) = 0 POL(U2_gaag(x_1)) = 0 POL(U2_gaga(x_1, x_2)) = x_1 POL(U2_gagg(x_1, x_2)) = x_1 POL(U2_ggaa(x_1)) = 0 POL(U2_ggag(x_1)) = 0 POL(U2_ggga(x_1, x_2)) = x_1 POL(U2_gggg(x_1, x_2)) = x_1 POL(U3_gaaa(x_1)) = 0 POL(U3_gaag(x_1)) = 0 POL(U3_gaga(x_1, x_2)) = x_1 POL(U3_gagg(x_1, x_2)) = x_1 POL(U3_ggaa(x_1)) = 0 POL(U3_ggag(x_1)) = 1 POL(U3_ggga(x_1, x_2)) = x_1 POL(U3_gggg(x_1, x_2)) = x_1 POL(U47_gg(x_1)) = 1 + x_1 POL(U48_gg(x_1)) = 1 + x_1 POL(U4_gaaa(x_1)) = 1 POL(U4_gaag(x_1)) = 0 POL(U4_gaga(x_1)) = 0 POL(U4_gagg(x_1)) = 0 POL(U4_ggaa(x_1)) = 0 POL(U4_ggag(x_1)) = 0 POL(U4_ggga(x_1)) = 0 POL(U4_gggg(x_1)) = 0 POL(U5_gaaa(x_1)) = 1 POL(U5_gaag(x_1)) = 1 + x_1 POL(U5_gaga(x_1)) = 1 + x_1 POL(U5_gagg(x_1)) = 1 + x_1 POL(U5_ggaa(x_1)) = 1 POL(U5_ggag(x_1)) = 1 POL(U5_ggga(x_1)) = 1 + x_1 POL(U5_gggg(x_1)) = 1 + x_1 POL(U6_GGGG(x_1, x_2, x_3, x_4, x_5)) = x_1 POL(U6_gaaa(x_1, x_2)) = 1 + x_1 POL(U6_gaag(x_1, x_2, x_3)) = 1 + x_1 + x_2 POL(U6_gaga(x_1, x_2, x_3)) = 1 + x_1 + x_2 POL(U6_gagg(x_1, x_2, x_3, x_4)) = 1 + x_1 + x_2 + x_3 POL(U6_ggaa(x_1, x_2, x_3)) = 1 + x_1 + x_2 POL(U6_ggag(x_1, x_2, x_3, x_4)) = 1 + x_1 + x_2 + x_3 POL(U6_ggga(x_1, x_2, x_3, x_4)) = x_2 + x_3 POL(U6_gggg(x_1, x_2, x_3, x_4, x_5)) = x_2 + x_3 + x_4 POL(U7_GGGG(x_1, x_2, x_3, x_4, x_5, x_6)) = x_1 POL(U7_gaaa(x_1, x_2, x_3)) = x_1 + x_2 POL(U7_gaag(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U7_gaga(x_1, x_2, x_3, x_4)) = 1 + x_1 + x_2 + x_3 POL(U7_gagg(x_1, x_2, x_3, x_4, x_5)) = x_1 + x_2 + x_3 + x_4 POL(U7_ggaa(x_1, x_2, x_3, x_4)) = 1 + x_1 + x_2 + x_3 POL(U7_ggag(x_1, x_2, x_3, x_4, x_5)) = x_1 + x_2 + x_3 + x_4 POL(U7_ggga(x_1, x_2, x_3, x_4, x_5)) = 1 + x_1 + x_2 + x_3 + x_4 POL(U7_gggg(x_1, x_2, x_3, x_4, x_5, x_6)) = 1 + x_1 + x_2 + x_3 + x_4 + x_5 POL(U8_GGGG(x_1, x_2, x_3, x_4, x_5)) = x_1 + x_5 POL(U8_gaaa(x_1, x_2)) = x_1 POL(U8_gaag(x_1, x_2, x_3)) = x_1 + x_2 POL(U8_gaga(x_1, x_2, x_3)) = x_1 + x_2 POL(U8_gagg(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U8_ggaa(x_1, x_2, x_3)) = x_1 + x_2 POL(U8_ggag(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U8_ggga(x_1, x_2, x_3, x_4)) = x_1 + x_2 + x_3 POL(U8_gggg(x_1, x_2, x_3, x_4, x_5)) = x_1 + x_2 + x_3 + x_4 POL(U9_GGGG(x_1, x_2, x_3, x_4)) = x_4 POL(U9_gaaa(x_1)) = 1 POL(U9_gaag(x_1, x_2)) = 1 + x_1 POL(U9_gaga(x_1, x_2)) = 1 + x_1 POL(U9_gagg(x_1, x_2, x_3)) = 1 + x_1 + x_2 POL(U9_ggaa(x_1, x_2)) = 1 + x_1 POL(U9_ggag(x_1, x_2, x_3)) = 1 + x_1 + x_2 POL(U9_ggga(x_1, x_2, x_3)) = 1 + x_1 + x_2 POL(U9_gggg(x_1, x_2, x_3, x_4)) = 1 + x_1 + x_2 + x_3 POL(isGreater_in_gg(x_1, x_2)) = 0 POL(isGreater_out_gg) = 0 POL(isMinus_in_gga(x_1, x_2)) = 0 POL(isMinus_out_gga(x_1)) = x_1 POL(move_in_gaaa(x_1)) = 0 POL(move_in_gaag(x_1, x_2)) = 0 POL(move_in_gaga(x_1, x_2)) = 0 POL(move_in_gagg(x_1, x_2, x_3)) = 0 POL(move_in_ggaa(x_1, x_2)) = 0 POL(move_in_ggag(x_1, x_2, x_3)) = 0 POL(move_in_ggga(x_1, x_2, x_3)) = 0 POL(move_in_gggg(x_1, x_2, x_3, x_4)) = 0 POL(move_out_gaaa) = 0 POL(move_out_gaag) = 0 POL(move_out_gaga) = 0 POL(move_out_gagg) = 0 POL(move_out_ggaa) = 0 POL(move_out_ggag) = 0 POL(move_out_ggga) = 0 POL(move_out_gggg) = 0 POL(nl_in_) = 0 POL(nl_out_) = 0 POL(pred(x_1)) = 0 POL(succ(x_1)) = 1 + x_1 POL(write_in_a) = 0 POL(write_in_g(x_1)) = 0 POL(write_out_a) = 0 POL(write_out_g) = 0 POL(zero) = 0 The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented: none ---------------------------------------- (901) Obligation: Q DP problem: The TRS P consists of the following rules: U10_GGGG(x0, x2, x1, =_out_ag(succ(zero))) -> U11_GGGG(x0, x2, x1, succ(zero), move_out_gggg) U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) -> U7_GGGG(succ(y_0), x1, x2, x3, succ(y_0), =_out_ag(succ(zero))) MOVE_IN_GGGG(succ(y_0), x1, x2, x3) -> U6_GGGG(succ(y_0), x1, x2, x3, =_out_ag(succ(y_0))) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_0))) -> MOVE_IN_GGGG(succ(y_0), x0, x2, x1) U12_GGGG(x0, x1, x2, succ(y_0), move_out_ggga) -> MOVE_IN_GGGG(succ(y_0), x2, x1, x0) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), U6_ggga(succ(zero), x0, x1, =_out_ag(succ(zero)))) U11_GGGG(x0, x1, x2, succ(y_3), move_out_gggg) -> U12_GGGG(x0, x1, x2, succ(y_3), move_out_ggga) U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) -> U11_GGGG(x0, x1, x2, succ(y_3), U6_gggg(succ(y_3), x0, x2, x1, =_out_ag(succ(y_3)))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(zero))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(zero))) U9_GGGG(x0, x1, x2, isMinus_out_gga(succ(y_3))) -> U10_GGGG(x0, x1, x2, =_out_ag(succ(y_3))) U7_GGGG(succ(succ(zero)), x1, x2, x3, succ(succ(zero)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(zero)), x1, x2, x3, isGreater_out_gg) U7_GGGG(succ(succ(y_0)), x1, x2, x3, succ(succ(y_0)), =_out_ag(succ(zero))) -> U8_GGGG(succ(succ(y_0)), x1, x2, x3, isGreater_out_gg) The TRS R consists of the following rules: move_in_gggg(succ(zero), X, Y, X1) -> U1_gggg(X, Y, write_in_g('Move top disk from ')) write_in_g(X0) -> write_out_g U1_gggg(X, Y, write_out_g) -> U2_gggg(Y, write_in_g(X)) U2_gggg(Y, write_out_g) -> U3_gggg(Y, write_in_g(' to ')) U3_gggg(Y, write_out_g) -> U4_gggg(write_in_g(Y)) U4_gggg(write_out_g) -> U5_gggg(nl_in_) nl_in_ -> nl_out_ U5_gggg(nl_out_) -> move_out_gggg move_in_gggg(N, X, Y, Z) -> U6_gggg(N, X, Y, Z, =_in_ag(N)) =_in_ag(X) -> =_out_ag(X) U6_gggg(N, X, Y, Z, =_out_ag(X1)) -> U7_gggg(N, X, Y, Z, X1, =_in_ag(succ(zero))) U7_gggg(N, X, Y, Z, X1, =_out_ag(X3)) -> U8_gggg(N, X, Y, Z, isGreater_in_gg(X1, X3)) isGreater_in_gg(succ(X), zero) -> isGreater_out_gg isGreater_in_gg(succ(X), pred(Y)) -> isGreater_out_gg isGreater_in_gg(succ(X), succ(Y)) -> U47_gg(isGreater_in_gg(X, Y)) isGreater_in_gg(zero, pred(Y)) -> isGreater_out_gg isGreater_in_gg(pred(X), pred(Y)) -> U48_gg(isGreater_in_gg(X, Y)) U48_gg(isGreater_out_gg) -> isGreater_out_gg U47_gg(isGreater_out_gg) -> isGreater_out_gg U8_gggg(N, X, Y, Z, isGreater_out_gg) -> U9_gggg(X, Y, Z, isMinus_in_gga(N, succ(zero))) isMinus_in_gga(X, zero) -> isMinus_out_gga(X) isMinus_in_gga(zero, succ(Y)) -> U18_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(zero, pred(Y)) -> U19_gga(isMinus_in_gga(zero, Y)) isMinus_in_gga(succ(X), succ(Y)) -> U20_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(succ(X), pred(Y)) -> U21_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), succ(Y)) -> U22_gga(isMinus_in_gga(X, Y)) isMinus_in_gga(pred(X), pred(Y)) -> U23_gga(isMinus_in_gga(X, Y)) U23_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U22_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(pred(Z))) U21_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(succ(Z))) U20_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(Z) U19_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(succ(Z)) U18_gga(isMinus_out_gga(Z)) -> isMinus_out_gga(pred(Z)) U9_gggg(X, Y, Z, isMinus_out_gga(U)) -> U10_gggg(X, Y, Z, =_in_ag(U)) U10_gggg(X, Y, Z, =_out_ag(M)) -> U11_gggg(X, Y, Z, M, move_in_gggg(M, X, Z, Y)) U11_gggg(X, Y, Z, M, move_out_gggg) -> U12_gggg(X, Y, Z, M, move_in_ggga(succ(zero), X, Y)) move_in_ggga(succ(zero), X, Y) -> U1_ggga(X, Y, write_in_g('Move top disk from ')) U1_ggga(X, Y, write_out_g) -> U2_ggga(Y, write_in_g(X)) U2_ggga(Y, write_out_g) -> U3_ggga(Y, write_in_g(' to ')) U3_ggga(Y, write_out_g) -> U4_ggga(write_in_g(Y)) U4_ggga(write_out_g) -> U5_ggga(nl_in_) U5_ggga(nl_out_) -> move_out_ggga move_in_ggga(N, X, Y) -> U6_ggga(N, X, Y, =_in_ag(N)) U6_ggga(N, X, Y, =_out_ag(X1)) -> U7_ggga(N, X, Y, X1, =_in_ag(succ(zero))) U7_ggga(N, X, Y, X1, =_out_ag(X3)) -> U8_ggga(N, X, Y, isGreater_in_gg(X1, X3)) U8_ggga(N, X, Y, isGreater_out_gg) -> U9_ggga(X, Y, isMinus_in_gga(N, succ(zero))) U9_ggga(X, Y, isMinus_out_gga(U)) -> U10_ggga(X, Y, =_in_ag(U)) U10_ggga(X, Y, =_out_ag(M)) -> U11_ggga(X, Y, M, move_in_ggag(M, X, Y)) move_in_ggag(succ(zero), X, X1) -> U1_ggag(X, write_in_g('Move top disk from ')) U1_ggag(X, write_out_g) -> U2_ggag(write_in_g(X)) U2_ggag(write_out_g) -> U3_ggag(write_in_g(' to ')) U3_ggag(write_out_g) -> U4_ggag(write_in_a) write_in_a -> write_out_a U4_ggag(write_out_a) -> U5_ggag(nl_in_) U5_ggag(nl_out_) -> move_out_ggag move_in_ggag(N, X, Z) -> U6_ggag(N, X, Z, =_in_ag(N)) U6_ggag(N, X, Z, =_out_ag(X1)) -> U7_ggag(N, X, Z, X1, =_in_ag(succ(zero))) U7_ggag(N, X, Z, X1, =_out_ag(X3)) -> U8_ggag(N, X, Z, isGreater_in_gg(X1, X3)) U8_ggag(N, X, Z, isGreater_out_gg) -> U9_ggag(X, Z, isMinus_in_gga(N, succ(zero))) U9_ggag(X, Z, isMinus_out_gga(U)) -> U10_ggag(X, Z, =_in_ag(U)) U10_ggag(X, Z, =_out_ag(M)) -> U11_ggag(X, Z, M, move_in_ggga(M, X, Z)) U11_ggag(X, Z, M, move_out_ggga) -> U12_ggag(X, Z, M, move_in_ggaa(succ(zero), X)) move_in_ggaa(succ(zero), X) -> U1_ggaa(X, write_in_g('Move top disk from ')) U1_ggaa(X, write_out_g) -> U2_ggaa(write_in_g(X)) U2_ggaa(write_out_g) -> U3_ggaa(write_in_g(' to ')) U3_ggaa(write_out_g) -> U4_ggaa(write_in_a) U4_ggaa(write_out_a) -> U5_ggaa(nl_in_) U5_ggaa(nl_out_) -> move_out_ggaa move_in_ggaa(N, X) -> U6_ggaa(N, X, =_in_ag(N)) U6_ggaa(N, X, =_out_ag(X1)) -> U7_ggaa(N, X, X1, =_in_ag(succ(zero))) U7_ggaa(N, X, X1, =_out_ag(X3)) -> U8_ggaa(N, X, isGreater_in_gg(X1, X3)) U8_ggaa(N, X, isGreater_out_gg) -> U9_ggaa(X, isMinus_in_gga(N, succ(zero))) U9_ggaa(X, isMinus_out_gga(U)) -> U10_ggaa(X, =_in_ag(U)) U10_ggaa(X, =_out_ag(M)) -> U11_ggaa(X, M, move_in_ggaa(M, X)) U11_ggaa(X, M, move_out_ggaa) -> U12_ggaa(X, M, move_in_ggaa(succ(zero), X)) U12_ggaa(X, M, move_out_ggaa) -> U13_ggaa(move_in_gaag(M, X)) move_in_gaag(succ(zero), X1) -> U1_gaag(write_in_g('Move top disk from ')) U1_gaag(write_out_g) -> U2_gaag(write_in_a) U2_gaag(write_out_a) -> U3_gaag(write_in_g(' to ')) U3_gaag(write_out_g) -> U4_gaag(write_in_a) U4_gaag(write_out_a) -> U5_gaag(nl_in_) U5_gaag(nl_out_) -> move_out_gaag move_in_gaag(N, Z) -> U6_gaag(N, Z, =_in_ag(N)) U6_gaag(N, Z, =_out_ag(X1)) -> U7_gaag(N, Z, X1, =_in_ag(succ(zero))) U7_gaag(N, Z, X1, =_out_ag(X3)) -> U8_gaag(N, Z, isGreater_in_gg(X1, X3)) U8_gaag(N, Z, isGreater_out_gg) -> U9_gaag(Z, isMinus_in_gga(N, succ(zero))) U9_gaag(Z, isMinus_out_gga(U)) -> U10_gaag(Z, =_in_ag(U)) U10_gaag(Z, =_out_ag(M)) -> U11_gaag(Z, M, move_in_gaga(M, Z)) move_in_gaga(succ(zero), Y) -> U1_gaga(Y, write_in_g('Move top disk from ')) U1_gaga(Y, write_out_g) -> U2_gaga(Y, write_in_a) U2_gaga(Y, write_out_a) -> U3_gaga(Y, write_in_g(' to ')) U3_gaga(Y, write_out_g) -> U4_gaga(write_in_g(Y)) U4_gaga(write_out_g) -> U5_gaga(nl_in_) U5_gaga(nl_out_) -> move_out_gaga move_in_gaga(N, Y) -> U6_gaga(N, Y, =_in_ag(N)) U6_gaga(N, Y, =_out_ag(X1)) -> U7_gaga(N, Y, X1, =_in_ag(succ(zero))) U7_gaga(N, Y, X1, =_out_ag(X3)) -> U8_gaga(N, Y, isGreater_in_gg(X1, X3)) U8_gaga(N, Y, isGreater_out_gg) -> U9_gaga(Y, isMinus_in_gga(N, succ(zero))) U9_gaga(Y, isMinus_out_gga(U)) -> U10_gaga(Y, =_in_ag(U)) U10_gaga(Y, =_out_ag(M)) -> U11_gaga(Y, M, move_in_gaag(M, Y)) U11_gaga(Y, M, move_out_gaag) -> U12_gaga(Y, M, move_in_gaga(succ(zero), Y)) U12_gaga(Y, M, move_out_gaga) -> U13_gaga(move_in_gaga(M, Y)) U13_gaga(move_out_gaga) -> move_out_gaga U11_gaag(Z, M, move_out_gaga) -> U12_gaag(Z, M, move_in_gaaa(succ(zero))) move_in_gaaa(succ(zero)) -> U1_gaaa(write_in_g('Move top disk from ')) U1_gaaa(write_out_g) -> U2_gaaa(write_in_a) U2_gaaa(write_out_a) -> U3_gaaa(write_in_g(' to ')) U3_gaaa(write_out_g) -> U4_gaaa(write_in_a) U4_gaaa(write_out_a) -> U5_gaaa(nl_in_) U5_gaaa(nl_out_) -> move_out_gaaa move_in_gaaa(N) -> U6_gaaa(N, =_in_ag(N)) U6_gaaa(N, =_out_ag(X1)) -> U7_gaaa(N, X1, =_in_ag(succ(zero))) U7_gaaa(N, X1, =_out_ag(X3)) -> U8_gaaa(N, isGreater_in_gg(X1, X3)) U8_gaaa(N, isGreater_out_gg) -> U9_gaaa(isMinus_in_gga(N, succ(zero))) U9_gaaa(isMinus_out_gga(U)) -> U10_gaaa(=_in_ag(U)) U10_gaaa(=_out_ag(M)) -> U11_gaaa(M, move_in_gaaa(M)) U11_gaaa(M, move_out_gaaa) -> U12_gaaa(M, move_in_gaaa(succ(zero))) U12_gaaa(M, move_out_gaaa) -> U13_gaaa(move_in_gaaa(M)) U13_gaaa(move_out_gaaa) -> move_out_gaaa U12_gaag(Z, M, move_out_gaaa) -> U13_gaag(move_in_ggaa(M, Z)) U13_gaag(move_out_ggaa) -> move_out_gaag U13_ggaa(move_out_gaag) -> move_out_ggaa U12_ggag(X, Z, M, move_out_ggaa) -> U13_ggag(move_in_ggag(M, Z, X)) U13_ggag(move_out_ggag) -> move_out_ggag U11_ggga(X, Y, M, move_out_ggag) -> U12_ggga(X, Y, M, move_in_ggga(succ(zero), X, Y)) U12_ggga(X, Y, M, move_out_ggga) -> U13_ggga(move_in_gagg(M, Y, X)) move_in_gagg(succ(zero), Y, X1) -> U1_gagg(Y, write_in_g('Move top disk from ')) U1_gagg(Y, write_out_g) -> U2_gagg(Y, write_in_a) U2_gagg(Y, write_out_a) -> U3_gagg(Y, write_in_g(' to ')) U3_gagg(Y, write_out_g) -> U4_gagg(write_in_g(Y)) U4_gagg(write_out_g) -> U5_gagg(nl_in_) U5_gagg(nl_out_) -> move_out_gagg move_in_gagg(N, Y, Z) -> U6_gagg(N, Y, Z, =_in_ag(N)) U6_gagg(N, Y, Z, =_out_ag(X1)) -> U7_gagg(N, Y, Z, X1, =_in_ag(succ(zero))) U7_gagg(N, Y, Z, X1, =_out_ag(X3)) -> U8_gagg(N, Y, Z, isGreater_in_gg(X1, X3)) U8_gagg(N, Y, Z, isGreater_out_gg) -> U9_gagg(Y, Z, isMinus_in_gga(N, succ(zero))) U9_gagg(Y, Z, isMinus_out_gga(U)) -> U10_gagg(Y, Z, =_in_ag(U)) U10_gagg(Y, Z, =_out_ag(M)) -> U11_gagg(Y, Z, M, move_in_gagg(M, Z, Y)) U11_gagg(Y, Z, M, move_out_gagg) -> U12_gagg(Y, Z, M, move_in_gaga(succ(zero), Y)) U12_gagg(Y, Z, M, move_out_gaga) -> U13_gagg(move_in_ggga(M, Z, Y)) U13_gagg(move_out_ggga) -> move_out_gagg U13_ggga(move_out_gagg) -> move_out_ggga U12_gggg(X, Y, Z, M, move_out_ggga) -> U13_gggg(move_in_gggg(M, Z, Y, X)) U13_gggg(move_out_gggg) -> move_out_gggg The set Q consists of the following terms: move_in_gggg(x0, x1, x2, x3) write_in_g(x0) U1_gggg(x0, x1, x2) U2_gggg(x0, x1) U3_gggg(x0, x1) U4_gggg(x0) nl_in_ U5_gggg(x0) =_in_ag(x0) U6_gggg(x0, x1, x2, x3, x4) U7_gggg(x0, x1, x2, x3, x4, x5) isGreater_in_gg(x0, x1) U48_gg(x0) U47_gg(x0) U8_gggg(x0, x1, x2, x3, x4) isMinus_in_gga(x0, x1) U23_gga(x0) U22_gga(x0) U21_gga(x0) U20_gga(x0) U19_gga(x0) U18_gga(x0) U9_gggg(x0, x1, x2, x3) U10_gggg(x0, x1, x2, x3) U11_gggg(x0, x1, x2, x3, x4) move_in_ggga(x0, x1, x2) U1_ggga(x0, x1, x2) U2_ggga(x0, x1) U3_ggga(x0, x1) U4_ggga(x0) U5_ggga(x0) U6_ggga(x0, x1, x2, x3) U7_ggga(x0, x1, x2, x3, x4) U8_ggga(x0, x1, x2, x3) U9_ggga(x0, x1, x2) U10_ggga(x0, x1, x2) move_in_ggag(x0, x1, x2) U1_ggag(x0, x1) U2_ggag(x0) U3_ggag(x0) write_in_a U4_ggag(x0) U5_ggag(x0) U6_ggag(x0, x1, x2, x3) U7_ggag(x0, x1, x2, x3, x4) U8_ggag(x0, x1, x2, x3) U9_ggag(x0, x1, x2) U10_ggag(x0, x1, x2) U11_ggag(x0, x1, x2, x3) move_in_ggaa(x0, x1) U1_ggaa(x0, x1) U2_ggaa(x0) U3_ggaa(x0) U4_ggaa(x0) U5_ggaa(x0) U6_ggaa(x0, x1, x2) U7_ggaa(x0, x1, x2, x3) U8_ggaa(x0, x1, x2) U9_ggaa(x0, x1) U10_ggaa(x0, x1) U11_ggaa(x0, x1, x2) U12_ggaa(x0, x1, x2) move_in_gaag(x0, x1) U1_gaag(x0) U2_gaag(x0) U3_gaag(x0) U4_gaag(x0) U5_gaag(x0) U6_gaag(x0, x1, x2) U7_gaag(x0, x1, x2, x3) U8_gaag(x0, x1, x2) U9_gaag(x0, x1) U10_gaag(x0, x1) move_in_gaga(x0, x1) U1_gaga(x0, x1) U2_gaga(x0, x1) U3_gaga(x0, x1) U4_gaga(x0) U5_gaga(x0) U6_gaga(x0, x1, x2) U7_gaga(x0, x1, x2, x3) U8_gaga(x0, x1, x2) U9_gaga(x0, x1) U10_gaga(x0, x1) U11_gaga(x0, x1, x2) U12_gaga(x0, x1, x2) U13_gaga(x0) U11_gaag(x0, x1, x2) move_in_gaaa(x0) U1_gaaa(x0) U2_gaaa(x0) U3_gaaa(x0) U4_gaaa(x0) U5_gaaa(x0) U6_gaaa(x0, x1) U7_gaaa(x0, x1, x2) U8_gaaa(x0, x1) U9_gaaa(x0) U10_gaaa(x0) U11_gaaa(x0, x1) U12_gaaa(x0, x1) U13_gaaa(x0) U12_gaag(x0, x1, x2) U13_gaag(x0) U13_ggaa(x0) U12_ggag(x0, x1, x2, x3) U13_ggag(x0) U11_ggga(x0, x1, x2, x3) U12_ggga(x0, x1, x2, x3) move_in_gagg(x0, x1, x2) U1_gagg(x0, x1) U2_gagg(x0, x1) U3_gagg(x0, x1) U4_gagg(x0) U5_gagg(x0) U6_gagg(x0, x1, x2, x3) U7_gagg(x0, x1, x2, x3, x4) U8_gagg(x0, x1, x2, x3) U9_gagg(x0, x1, x2) U10_gagg(x0, x1, x2) U11_gagg(x0, x1, x2, x3) U12_gagg(x0, x1, x2, x3) U13_gagg(x0) U13_ggga(x0) U12_gggg(x0, x1, x2, x3, x4) U13_gggg(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (902) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 12 less nodes. ---------------------------------------- (903) TRUE