/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.pl /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- MAYBE proof of /export/starexec/sandbox2/benchmark/theBenchmark.pl # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Left Termination of the query pattern main(g) w.r.t. the given Prolog program could not be shown: (0) Prolog (1) BuiltinConflictTransformerProof [EQUIVALENT, 0 ms] (2) Prolog (3) IntegerArithmeticTransformerProof [SOUND, 0 ms] (4) Prolog (5) CutEliminatorProof [SOUND, 0 ms] (6) Prolog (7) UnifyTransformerProof [EQUIVALENT, 0 ms] (8) Prolog (9) OrTransformerProof [EQUIVALENT, 0 ms] (10) Prolog (11) PrologToPiTRSProof [SOUND, 0 ms] (12) PiTRS (13) DependencyPairsProof [EQUIVALENT, 22 ms] (14) PiDP (15) DependencyGraphProof [EQUIVALENT, 0 ms] (16) AND (17) PiDP (18) UsableRulesProof [EQUIVALENT, 0 ms] (19) PiDP (20) PiDPToQDPProof [EQUIVALENT, 0 ms] (21) QDP (22) QDPSizeChangeProof [EQUIVALENT, 0 ms] (23) YES (24) PiDP (25) UsableRulesProof [EQUIVALENT, 0 ms] (26) PiDP (27) PiDPToQDPProof [SOUND, 0 ms] (28) QDP (29) TransformationProof [EQUIVALENT, 0 ms] (30) QDP (31) TransformationProof [EQUIVALENT, 0 ms] (32) QDP (33) NonTerminationLoopProof [COMPLETE, 0 ms] (34) NO (35) PiDP (36) UsableRulesProof [EQUIVALENT, 0 ms] (37) PiDP (38) PiDPToQDPProof [EQUIVALENT, 0 ms] (39) QDP (40) QDPSizeChangeProof [EQUIVALENT, 0 ms] (41) YES (42) PrologToPiTRSProof [SOUND, 1 ms] (43) PiTRS (44) DependencyPairsProof [EQUIVALENT, 22 ms] (45) PiDP (46) DependencyGraphProof [EQUIVALENT, 0 ms] (47) AND (48) PiDP (49) UsableRulesProof [EQUIVALENT, 0 ms] (50) PiDP (51) PiDPToQDPProof [EQUIVALENT, 0 ms] (52) QDP (53) QDPSizeChangeProof [EQUIVALENT, 0 ms] (54) YES (55) PiDP (56) UsableRulesProof [EQUIVALENT, 0 ms] (57) PiDP (58) PiDPToQDPProof [SOUND, 0 ms] (59) QDP (60) TransformationProof [EQUIVALENT, 0 ms] (61) QDP (62) TransformationProof [EQUIVALENT, 0 ms] (63) QDP (64) NonTerminationLoopProof [COMPLETE, 0 ms] (65) NO (66) PiDP (67) UsableRulesProof [EQUIVALENT, 0 ms] (68) PiDP (69) PiDPToQDPProof [EQUIVALENT, 0 ms] (70) QDP (71) QDPSizeChangeProof [EQUIVALENT, 0 ms] (72) YES (73) CutEliminatorProof [SOUND, 0 ms] (74) Prolog (75) UndefinedPredicateHandlerProof [SOUND, 0 ms] (76) Prolog (77) PrologToPiTRSProof [SOUND, 14 ms] (78) PiTRS (79) DependencyPairsProof [EQUIVALENT, 0 ms] (80) PiDP (81) DependencyGraphProof [EQUIVALENT, 0 ms] (82) PiDP (83) UsableRulesProof [EQUIVALENT, 0 ms] (84) PiDP (85) PiDPToQDPProof [SOUND, 0 ms] (86) QDP (87) TransformationProof [EQUIVALENT, 0 ms] (88) QDP (89) TransformationProof [EQUIVALENT, 0 ms] (90) QDP (91) NonTerminationLoopProof [COMPLETE, 7 ms] (92) NO (93) PrologToPiTRSProof [SOUND, 3 ms] (94) PiTRS (95) DependencyPairsProof [EQUIVALENT, 14 ms] (96) PiDP (97) DependencyGraphProof [EQUIVALENT, 0 ms] (98) PiDP (99) UsableRulesProof [EQUIVALENT, 0 ms] (100) PiDP (101) PiDPToQDPProof [SOUND, 0 ms] (102) QDP (103) TransformationProof [EQUIVALENT, 0 ms] (104) QDP (105) TransformationProof [EQUIVALENT, 0 ms] (106) QDP (107) NonTerminationLoopProof [COMPLETE, 0 ms] (108) NO (109) PrologToIRSwTTransformerProof [SOUND, 22 ms] (110) IRSwT (111) IRSwTSimpleDependencyGraphProof [EQUIVALENT, 0 ms] (112) IRSwT (113) IntTRSCompressionProof [EQUIVALENT, 29 ms] (114) IRSwT (115) IRSFormatTransformerProof [EQUIVALENT, 0 ms] (116) IRSwT (117) IRSwTTerminationDigraphProof [EQUIVALENT, 46 ms] (118) AND (119) IRSwT (120) IntTRSCompressionProof [EQUIVALENT, 0 ms] (121) IRSwT (122) TempFilterProof [SOUND, 24 ms] (123) IntTRS (124) PolynomialOrderProcessor [EQUIVALENT, 8 ms] (125) YES (126) IRSwT (127) IntTRSCompressionProof [EQUIVALENT, 0 ms] (128) IRSwT (129) IRSwTToIntTRSProof [SOUND, 0 ms] (130) IRSwT (131) IntTRSNonPeriodicNontermProof [COMPLETE, 4 ms] (132) NO ---------------------------------------- (0) Obligation: Clauses: main(N) :- ','(>=(N, 1), ','(=<(N, 31), hanoi(N, X1))). hanoi(N, Ret) :- ','(=:=(N, 1), ','(!, is(Ret, 1))). hanoi(N, Ret) :- hanoi(-(N, 1), Ret1). is(Ret, +(*(Ret1, 2), 1)). Query: main(g) ---------------------------------------- (1) BuiltinConflictTransformerProof (EQUIVALENT) Renamed defined predicates conflicting with built-in predicates [PROLOG]. ---------------------------------------- (2) Obligation: Clauses: main(N) :- ','(>=(N, 1), ','(=<(N, 31), hanoi(N, X1))). hanoi(N, Ret) :- ','(=:=(N, 1), ','(!, user_defined_is(Ret, 1))). hanoi(N, Ret) :- hanoi(-(N, 1), Ret1). user_defined_is(Ret, +(*(Ret1, 2), 1)). Query: main(g) ---------------------------------------- (3) IntegerArithmeticTransformerProof (SOUND) Added definitions of predefined predicates [PROLOG]. ---------------------------------------- (4) Obligation: Clauses: main(N) :- ','(=(X, N), ','(=(X2, succ(zero)), ','(;(isGreater(X, X2), =(X, X2)), ','(=(X3, N), ','(=(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))), ','(;(=(X3, X4), isLess(X3, X4)), hanoi(N, X1))))))). hanoi(N, Ret) :- ','(=(X, N), ','(=(X1, succ(zero)), ','(=(X, X1), ','(!, user_defined_is(Ret, succ(zero)))))). hanoi(N, Ret) :- hanoi(-(N, succ(zero)), Ret1). user_defined_is(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))). 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). isLess(pred(X), zero). isLess(pred(X), succ(Y)). isLess(pred(X), pred(Y)) :- isLess(X, Y). isLess(zero, succ(Y)). isLess(succ(X), succ(Y)) :- isLess(X, Y). Query: main(g) ---------------------------------------- (5) CutEliminatorProof (SOUND) Eliminated all cuts by simply ignoring them[PROLOG]. ---------------------------------------- (6) Obligation: Clauses: main(N) :- ','(=(X, N), ','(=(X2, succ(zero)), ','(;(isGreater(X, X2), =(X, X2)), ','(=(X3, N), ','(=(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))), ','(;(=(X3, X4), isLess(X3, X4)), hanoi(N, X1))))))). hanoi(N, Ret) :- ','(=(X, N), ','(=(X1, succ(zero)), ','(=(X, X1), user_defined_is(Ret, succ(zero))))). hanoi(N, Ret) :- hanoi(-(N, succ(zero)), Ret1). user_defined_is(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))). 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). isLess(pred(X), zero). isLess(pred(X), succ(Y)). isLess(pred(X), pred(Y)) :- isLess(X, Y). isLess(zero, succ(Y)). isLess(succ(X), succ(Y)) :- isLess(X, Y). Query: main(g) ---------------------------------------- (7) UnifyTransformerProof (EQUIVALENT) Added a fact for the built-in = predicate [PROLOG]. ---------------------------------------- (8) Obligation: Clauses: main(N) :- ','(=(X, N), ','(=(X2, succ(zero)), ','(;(isGreater(X, X2), =(X, X2)), ','(=(X3, N), ','(=(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))), ','(;(=(X3, X4), isLess(X3, X4)), hanoi(N, X1))))))). hanoi(N, Ret) :- ','(=(X, N), ','(=(X1, succ(zero)), ','(=(X, X1), user_defined_is(Ret, succ(zero))))). hanoi(N, Ret) :- hanoi(-(N, succ(zero)), Ret1). user_defined_is(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))). 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). isLess(pred(X), zero). isLess(pred(X), succ(Y)). isLess(pred(X), pred(Y)) :- isLess(X, Y). isLess(zero, succ(Y)). isLess(succ(X), succ(Y)) :- isLess(X, Y). =(X, X). Query: main(g) ---------------------------------------- (9) OrTransformerProof (EQUIVALENT) Transformed all or-constructs[PROLOG]. ---------------------------------------- (10) Obligation: Clauses: main(N) :- ','(=(X, N), ','(=(X2, succ(zero)), ','(isGreater(X, X2), ','(=(X3, N), ','(=(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))), ','(=(X3, X4), hanoi(N, X1))))))). main(N) :- ','(=(X, N), ','(=(X2, succ(zero)), ','(isGreater(X, X2), ','(=(X3, N), ','(=(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))), ','(isLess(X3, X4), hanoi(N, X1))))))). main(N) :- ','(=(X, N), ','(=(X2, succ(zero)), ','(=(X, X2), ','(=(X3, N), ','(=(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))), ','(=(X3, X4), hanoi(N, X1))))))). main(N) :- ','(=(X, N), ','(=(X2, succ(zero)), ','(=(X, X2), ','(=(X3, N), ','(=(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))), ','(isLess(X3, X4), hanoi(N, X1))))))). hanoi(N, Ret) :- ','(=(X, N), ','(=(X1, succ(zero)), ','(=(X, X1), user_defined_is(Ret, succ(zero))))). hanoi(N, Ret) :- hanoi(-(N, succ(zero)), Ret1). user_defined_is(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))). 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). isLess(pred(X), zero). isLess(pred(X), succ(Y)). isLess(pred(X), pred(Y)) :- isLess(X, Y). isLess(zero, succ(Y)). isLess(succ(X), succ(Y)) :- isLess(X, Y). =(X, X). Query: main(g) ---------------------------------------- (11) PrologToPiTRSProof (SOUND) We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: main_in_1: (b) isGreater_in_2: (b,b) hanoi_in_2: (b,f) isLess_in_2: (b,b) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, =_in_ag(X, N)) =_in_ag(X, X) -> =_out_ag(X, X) U1_g(N, =_out_ag(X, N)) -> U2_g(N, X, =_in_ag(X2, succ(zero))) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U3_g(N, isGreater_in_gg(X, X2)) 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)) -> U55_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)) -> U56_gg(X, Y, isGreater_in_gg(X, Y)) U56_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U55_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U3_g(N, isGreater_out_gg(X, X2)) -> U4_g(N, =_in_ag(X3, N)) U4_g(N, =_out_ag(X3, N)) -> U5_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_g(N, =_in_gg(X3, X4)) =_in_gg(X, X) -> =_out_gg(X, X) U6_g(N, =_out_gg(X3, X4)) -> U7_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U17_ga(N, Ret, =_in_ag(X, N)) U17_ga(N, Ret, =_out_ag(X, N)) -> U18_ga(N, Ret, X, =_in_ag(X1, succ(zero))) U18_ga(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_ga(N, Ret, =_in_gg(X, X1)) U19_ga(N, Ret, =_out_gg(X, X1)) -> U20_ga(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) user_defined_is_in_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) -> user_defined_is_out_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) U20_ga(N, Ret, user_defined_is_out_ag(Ret, succ(zero))) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U21_ga(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) U21_ga(N, Ret, hanoi_out_ga(-(N, succ(zero)), Ret1)) -> hanoi_out_ga(N, Ret) U7_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_g(N, isLess_in_gg(X3, X4)) isLess_in_gg(pred(X), zero) -> isLess_out_gg(pred(X), zero) isLess_in_gg(pred(X), succ(Y)) -> isLess_out_gg(pred(X), succ(Y)) isLess_in_gg(pred(X), pred(Y)) -> U57_gg(X, Y, isLess_in_gg(X, Y)) isLess_in_gg(zero, succ(Y)) -> isLess_out_gg(zero, succ(Y)) isLess_in_gg(succ(X), succ(Y)) -> U58_gg(X, Y, isLess_in_gg(X, Y)) U58_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(succ(X), succ(Y)) U57_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(pred(X), pred(Y)) U8_g(N, isLess_out_gg(X3, X4)) -> U9_g(N, hanoi_in_ga(N, X1)) U9_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U10_g(N, =_in_gg(X, X2)) U10_g(N, =_out_gg(X, X2)) -> U11_g(N, =_in_ag(X3, N)) U11_g(N, =_out_ag(X3, N)) -> U12_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_g(N, =_in_gg(X3, X4)) U13_g(N, =_out_gg(X3, X4)) -> U14_g(N, hanoi_in_ga(N, X1)) U14_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_g(N, isLess_in_gg(X3, X4)) U15_g(N, isLess_out_gg(X3, X4)) -> U16_g(N, hanoi_in_ga(N, X1)) U16_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1, x2) U2_g(x1, x2, x3) = U2_g(x1, x2, x3) succ(x1) = succ(x1) zero = zero U3_g(x1, x2) = U3_g(x1, x2) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg(x1, x2) pred(x1) = pred(x1) U55_gg(x1, x2, x3) = U55_gg(x1, x2, x3) U56_gg(x1, x2, x3) = U56_gg(x1, x2, x3) U4_g(x1, x2) = U4_g(x1, x2) U5_g(x1, x2, x3) = U5_g(x1, x2, x3) U6_g(x1, x2) = U6_g(x1, x2) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg(x1, x2) U7_g(x1, x2) = U7_g(x1, x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U17_ga(x1, x2, x3) = U17_ga(x1, x3) U18_ga(x1, x2, x3, x4) = U18_ga(x1, x3, x4) U19_ga(x1, x2, x3) = U19_ga(x1, x3) U20_ga(x1, x2, x3) = U20_ga(x1, x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag(x2) hanoi_out_ga(x1, x2) = hanoi_out_ga(x1) U21_ga(x1, x2, x3) = U21_ga(x1, x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g(x1) U8_g(x1, x2) = U8_g(x1, x2) isLess_in_gg(x1, x2) = isLess_in_gg(x1, x2) isLess_out_gg(x1, x2) = isLess_out_gg(x1, x2) U57_gg(x1, x2, x3) = U57_gg(x1, x2, x3) U58_gg(x1, x2, x3) = U58_gg(x1, x2, x3) U9_g(x1, x2) = U9_g(x1, x2) U10_g(x1, x2) = U10_g(x1, x2) U11_g(x1, x2) = U11_g(x1, x2) U12_g(x1, x2, x3) = U12_g(x1, x2, x3) U13_g(x1, x2) = U13_g(x1, x2) U14_g(x1, x2) = U14_g(x1, x2) U15_g(x1, x2) = U15_g(x1, x2) U16_g(x1, x2) = U16_g(x1, x2) Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog ---------------------------------------- (12) Obligation: Pi-finite rewrite system: The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, =_in_ag(X, N)) =_in_ag(X, X) -> =_out_ag(X, X) U1_g(N, =_out_ag(X, N)) -> U2_g(N, X, =_in_ag(X2, succ(zero))) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U3_g(N, isGreater_in_gg(X, X2)) 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)) -> U55_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)) -> U56_gg(X, Y, isGreater_in_gg(X, Y)) U56_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U55_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U3_g(N, isGreater_out_gg(X, X2)) -> U4_g(N, =_in_ag(X3, N)) U4_g(N, =_out_ag(X3, N)) -> U5_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_g(N, =_in_gg(X3, X4)) =_in_gg(X, X) -> =_out_gg(X, X) U6_g(N, =_out_gg(X3, X4)) -> U7_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U17_ga(N, Ret, =_in_ag(X, N)) U17_ga(N, Ret, =_out_ag(X, N)) -> U18_ga(N, Ret, X, =_in_ag(X1, succ(zero))) U18_ga(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_ga(N, Ret, =_in_gg(X, X1)) U19_ga(N, Ret, =_out_gg(X, X1)) -> U20_ga(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) user_defined_is_in_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) -> user_defined_is_out_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) U20_ga(N, Ret, user_defined_is_out_ag(Ret, succ(zero))) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U21_ga(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) U21_ga(N, Ret, hanoi_out_ga(-(N, succ(zero)), Ret1)) -> hanoi_out_ga(N, Ret) U7_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_g(N, isLess_in_gg(X3, X4)) isLess_in_gg(pred(X), zero) -> isLess_out_gg(pred(X), zero) isLess_in_gg(pred(X), succ(Y)) -> isLess_out_gg(pred(X), succ(Y)) isLess_in_gg(pred(X), pred(Y)) -> U57_gg(X, Y, isLess_in_gg(X, Y)) isLess_in_gg(zero, succ(Y)) -> isLess_out_gg(zero, succ(Y)) isLess_in_gg(succ(X), succ(Y)) -> U58_gg(X, Y, isLess_in_gg(X, Y)) U58_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(succ(X), succ(Y)) U57_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(pred(X), pred(Y)) U8_g(N, isLess_out_gg(X3, X4)) -> U9_g(N, hanoi_in_ga(N, X1)) U9_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U10_g(N, =_in_gg(X, X2)) U10_g(N, =_out_gg(X, X2)) -> U11_g(N, =_in_ag(X3, N)) U11_g(N, =_out_ag(X3, N)) -> U12_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_g(N, =_in_gg(X3, X4)) U13_g(N, =_out_gg(X3, X4)) -> U14_g(N, hanoi_in_ga(N, X1)) U14_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_g(N, isLess_in_gg(X3, X4)) U15_g(N, isLess_out_gg(X3, X4)) -> U16_g(N, hanoi_in_ga(N, X1)) U16_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1, x2) U2_g(x1, x2, x3) = U2_g(x1, x2, x3) succ(x1) = succ(x1) zero = zero U3_g(x1, x2) = U3_g(x1, x2) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg(x1, x2) pred(x1) = pred(x1) U55_gg(x1, x2, x3) = U55_gg(x1, x2, x3) U56_gg(x1, x2, x3) = U56_gg(x1, x2, x3) U4_g(x1, x2) = U4_g(x1, x2) U5_g(x1, x2, x3) = U5_g(x1, x2, x3) U6_g(x1, x2) = U6_g(x1, x2) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg(x1, x2) U7_g(x1, x2) = U7_g(x1, x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U17_ga(x1, x2, x3) = U17_ga(x1, x3) U18_ga(x1, x2, x3, x4) = U18_ga(x1, x3, x4) U19_ga(x1, x2, x3) = U19_ga(x1, x3) U20_ga(x1, x2, x3) = U20_ga(x1, x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag(x2) hanoi_out_ga(x1, x2) = hanoi_out_ga(x1) U21_ga(x1, x2, x3) = U21_ga(x1, x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g(x1) U8_g(x1, x2) = U8_g(x1, x2) isLess_in_gg(x1, x2) = isLess_in_gg(x1, x2) isLess_out_gg(x1, x2) = isLess_out_gg(x1, x2) U57_gg(x1, x2, x3) = U57_gg(x1, x2, x3) U58_gg(x1, x2, x3) = U58_gg(x1, x2, x3) U9_g(x1, x2) = U9_g(x1, x2) U10_g(x1, x2) = U10_g(x1, x2) U11_g(x1, x2) = U11_g(x1, x2) U12_g(x1, x2, x3) = U12_g(x1, x2, x3) U13_g(x1, x2) = U13_g(x1, x2) U14_g(x1, x2) = U14_g(x1, x2) U15_g(x1, x2) = U15_g(x1, x2) U16_g(x1, x2) = U16_g(x1, x2) ---------------------------------------- (13) 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: MAIN_IN_G(N) -> U1_G(N, =_in_ag(X, N)) MAIN_IN_G(N) -> =_IN_AG(X, N) U1_G(N, =_out_ag(X, N)) -> U2_G(N, X, =_in_ag(X2, succ(zero))) U1_G(N, =_out_ag(X, N)) -> =_IN_AG(X2, succ(zero)) U2_G(N, X, =_out_ag(X2, succ(zero))) -> U3_G(N, isGreater_in_gg(X, X2)) U2_G(N, X, =_out_ag(X2, succ(zero))) -> ISGREATER_IN_GG(X, X2) ISGREATER_IN_GG(succ(X), succ(Y)) -> U55_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)) -> U56_GG(X, Y, isGreater_in_gg(X, Y)) ISGREATER_IN_GG(pred(X), pred(Y)) -> ISGREATER_IN_GG(X, Y) U3_G(N, isGreater_out_gg(X, X2)) -> U4_G(N, =_in_ag(X3, N)) U3_G(N, isGreater_out_gg(X, X2)) -> =_IN_AG(X3, N) U4_G(N, =_out_ag(X3, N)) -> U5_G(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U4_G(N, =_out_ag(X3, N)) -> =_IN_AG(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_G(N, =_in_gg(X3, X4)) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> =_IN_GG(X3, X4) U6_G(N, =_out_gg(X3, X4)) -> U7_G(N, hanoi_in_ga(N, X1)) U6_G(N, =_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) HANOI_IN_GA(N, Ret) -> U17_GA(N, Ret, =_in_ag(X, N)) HANOI_IN_GA(N, Ret) -> =_IN_AG(X, N) U17_GA(N, Ret, =_out_ag(X, N)) -> U18_GA(N, Ret, X, =_in_ag(X1, succ(zero))) U17_GA(N, Ret, =_out_ag(X, N)) -> =_IN_AG(X1, succ(zero)) U18_GA(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_GA(N, Ret, =_in_gg(X, X1)) U18_GA(N, Ret, X, =_out_ag(X1, succ(zero))) -> =_IN_GG(X, X1) U19_GA(N, Ret, =_out_gg(X, X1)) -> U20_GA(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) U19_GA(N, Ret, =_out_gg(X, X1)) -> USER_DEFINED_IS_IN_AG(Ret, succ(zero)) HANOI_IN_GA(N, Ret) -> U21_GA(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, succ(zero)), Ret1) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_G(N, isLess_in_gg(X3, X4)) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> ISLESS_IN_GG(X3, X4) ISLESS_IN_GG(pred(X), pred(Y)) -> U57_GG(X, Y, isLess_in_gg(X, Y)) ISLESS_IN_GG(pred(X), pred(Y)) -> ISLESS_IN_GG(X, Y) ISLESS_IN_GG(succ(X), succ(Y)) -> U58_GG(X, Y, isLess_in_gg(X, Y)) ISLESS_IN_GG(succ(X), succ(Y)) -> ISLESS_IN_GG(X, Y) U8_G(N, isLess_out_gg(X3, X4)) -> U9_G(N, hanoi_in_ga(N, X1)) U8_G(N, isLess_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) U2_G(N, X, =_out_ag(X2, succ(zero))) -> U10_G(N, =_in_gg(X, X2)) U2_G(N, X, =_out_ag(X2, succ(zero))) -> =_IN_GG(X, X2) U10_G(N, =_out_gg(X, X2)) -> U11_G(N, =_in_ag(X3, N)) U10_G(N, =_out_gg(X, X2)) -> =_IN_AG(X3, N) U11_G(N, =_out_ag(X3, N)) -> U12_G(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U11_G(N, =_out_ag(X3, N)) -> =_IN_AG(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_G(N, =_in_gg(X3, X4)) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> =_IN_GG(X3, X4) U13_G(N, =_out_gg(X3, X4)) -> U14_G(N, hanoi_in_ga(N, X1)) U13_G(N, =_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_G(N, isLess_in_gg(X3, X4)) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> ISLESS_IN_GG(X3, X4) U15_G(N, isLess_out_gg(X3, X4)) -> U16_G(N, hanoi_in_ga(N, X1)) U15_G(N, isLess_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, =_in_ag(X, N)) =_in_ag(X, X) -> =_out_ag(X, X) U1_g(N, =_out_ag(X, N)) -> U2_g(N, X, =_in_ag(X2, succ(zero))) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U3_g(N, isGreater_in_gg(X, X2)) 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)) -> U55_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)) -> U56_gg(X, Y, isGreater_in_gg(X, Y)) U56_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U55_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U3_g(N, isGreater_out_gg(X, X2)) -> U4_g(N, =_in_ag(X3, N)) U4_g(N, =_out_ag(X3, N)) -> U5_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_g(N, =_in_gg(X3, X4)) =_in_gg(X, X) -> =_out_gg(X, X) U6_g(N, =_out_gg(X3, X4)) -> U7_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U17_ga(N, Ret, =_in_ag(X, N)) U17_ga(N, Ret, =_out_ag(X, N)) -> U18_ga(N, Ret, X, =_in_ag(X1, succ(zero))) U18_ga(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_ga(N, Ret, =_in_gg(X, X1)) U19_ga(N, Ret, =_out_gg(X, X1)) -> U20_ga(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) user_defined_is_in_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) -> user_defined_is_out_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) U20_ga(N, Ret, user_defined_is_out_ag(Ret, succ(zero))) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U21_ga(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) U21_ga(N, Ret, hanoi_out_ga(-(N, succ(zero)), Ret1)) -> hanoi_out_ga(N, Ret) U7_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_g(N, isLess_in_gg(X3, X4)) isLess_in_gg(pred(X), zero) -> isLess_out_gg(pred(X), zero) isLess_in_gg(pred(X), succ(Y)) -> isLess_out_gg(pred(X), succ(Y)) isLess_in_gg(pred(X), pred(Y)) -> U57_gg(X, Y, isLess_in_gg(X, Y)) isLess_in_gg(zero, succ(Y)) -> isLess_out_gg(zero, succ(Y)) isLess_in_gg(succ(X), succ(Y)) -> U58_gg(X, Y, isLess_in_gg(X, Y)) U58_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(succ(X), succ(Y)) U57_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(pred(X), pred(Y)) U8_g(N, isLess_out_gg(X3, X4)) -> U9_g(N, hanoi_in_ga(N, X1)) U9_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U10_g(N, =_in_gg(X, X2)) U10_g(N, =_out_gg(X, X2)) -> U11_g(N, =_in_ag(X3, N)) U11_g(N, =_out_ag(X3, N)) -> U12_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_g(N, =_in_gg(X3, X4)) U13_g(N, =_out_gg(X3, X4)) -> U14_g(N, hanoi_in_ga(N, X1)) U14_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_g(N, isLess_in_gg(X3, X4)) U15_g(N, isLess_out_gg(X3, X4)) -> U16_g(N, hanoi_in_ga(N, X1)) U16_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1, x2) U2_g(x1, x2, x3) = U2_g(x1, x2, x3) succ(x1) = succ(x1) zero = zero U3_g(x1, x2) = U3_g(x1, x2) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg(x1, x2) pred(x1) = pred(x1) U55_gg(x1, x2, x3) = U55_gg(x1, x2, x3) U56_gg(x1, x2, x3) = U56_gg(x1, x2, x3) U4_g(x1, x2) = U4_g(x1, x2) U5_g(x1, x2, x3) = U5_g(x1, x2, x3) U6_g(x1, x2) = U6_g(x1, x2) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg(x1, x2) U7_g(x1, x2) = U7_g(x1, x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U17_ga(x1, x2, x3) = U17_ga(x1, x3) U18_ga(x1, x2, x3, x4) = U18_ga(x1, x3, x4) U19_ga(x1, x2, x3) = U19_ga(x1, x3) U20_ga(x1, x2, x3) = U20_ga(x1, x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag(x2) hanoi_out_ga(x1, x2) = hanoi_out_ga(x1) U21_ga(x1, x2, x3) = U21_ga(x1, x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g(x1) U8_g(x1, x2) = U8_g(x1, x2) isLess_in_gg(x1, x2) = isLess_in_gg(x1, x2) isLess_out_gg(x1, x2) = isLess_out_gg(x1, x2) U57_gg(x1, x2, x3) = U57_gg(x1, x2, x3) U58_gg(x1, x2, x3) = U58_gg(x1, x2, x3) U9_g(x1, x2) = U9_g(x1, x2) U10_g(x1, x2) = U10_g(x1, x2) U11_g(x1, x2) = U11_g(x1, x2) U12_g(x1, x2, x3) = U12_g(x1, x2, x3) U13_g(x1, x2) = U13_g(x1, x2) U14_g(x1, x2) = U14_g(x1, x2) U15_g(x1, x2) = U15_g(x1, x2) U16_g(x1, x2) = U16_g(x1, x2) MAIN_IN_G(x1) = MAIN_IN_G(x1) U1_G(x1, x2) = U1_G(x1, x2) =_IN_AG(x1, x2) = =_IN_AG(x2) U2_G(x1, x2, x3) = U2_G(x1, x2, x3) U3_G(x1, x2) = U3_G(x1, x2) ISGREATER_IN_GG(x1, x2) = ISGREATER_IN_GG(x1, x2) U55_GG(x1, x2, x3) = U55_GG(x1, x2, x3) U56_GG(x1, x2, x3) = U56_GG(x1, x2, x3) U4_G(x1, x2) = U4_G(x1, x2) U5_G(x1, x2, x3) = U5_G(x1, x2, x3) U6_G(x1, x2) = U6_G(x1, x2) =_IN_GG(x1, x2) = =_IN_GG(x1, x2) U7_G(x1, x2) = U7_G(x1, x2) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) U17_GA(x1, x2, x3) = U17_GA(x1, x3) U18_GA(x1, x2, x3, x4) = U18_GA(x1, x3, x4) U19_GA(x1, x2, x3) = U19_GA(x1, x3) U20_GA(x1, x2, x3) = U20_GA(x1, x3) USER_DEFINED_IS_IN_AG(x1, x2) = USER_DEFINED_IS_IN_AG(x2) U21_GA(x1, x2, x3) = U21_GA(x1, x3) U8_G(x1, x2) = U8_G(x1, x2) ISLESS_IN_GG(x1, x2) = ISLESS_IN_GG(x1, x2) U57_GG(x1, x2, x3) = U57_GG(x1, x2, x3) U58_GG(x1, x2, x3) = U58_GG(x1, x2, x3) U9_G(x1, x2) = U9_G(x1, x2) U10_G(x1, x2) = U10_G(x1, x2) U11_G(x1, x2) = U11_G(x1, x2) U12_G(x1, x2, x3) = U12_G(x1, x2, x3) U13_G(x1, x2) = U13_G(x1, x2) U14_G(x1, x2) = U14_G(x1, x2) U15_G(x1, x2) = U15_G(x1, x2) U16_G(x1, x2) = U16_G(x1, x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (14) Obligation: Pi DP problem: The TRS P consists of the following rules: MAIN_IN_G(N) -> U1_G(N, =_in_ag(X, N)) MAIN_IN_G(N) -> =_IN_AG(X, N) U1_G(N, =_out_ag(X, N)) -> U2_G(N, X, =_in_ag(X2, succ(zero))) U1_G(N, =_out_ag(X, N)) -> =_IN_AG(X2, succ(zero)) U2_G(N, X, =_out_ag(X2, succ(zero))) -> U3_G(N, isGreater_in_gg(X, X2)) U2_G(N, X, =_out_ag(X2, succ(zero))) -> ISGREATER_IN_GG(X, X2) ISGREATER_IN_GG(succ(X), succ(Y)) -> U55_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)) -> U56_GG(X, Y, isGreater_in_gg(X, Y)) ISGREATER_IN_GG(pred(X), pred(Y)) -> ISGREATER_IN_GG(X, Y) U3_G(N, isGreater_out_gg(X, X2)) -> U4_G(N, =_in_ag(X3, N)) U3_G(N, isGreater_out_gg(X, X2)) -> =_IN_AG(X3, N) U4_G(N, =_out_ag(X3, N)) -> U5_G(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U4_G(N, =_out_ag(X3, N)) -> =_IN_AG(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_G(N, =_in_gg(X3, X4)) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> =_IN_GG(X3, X4) U6_G(N, =_out_gg(X3, X4)) -> U7_G(N, hanoi_in_ga(N, X1)) U6_G(N, =_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) HANOI_IN_GA(N, Ret) -> U17_GA(N, Ret, =_in_ag(X, N)) HANOI_IN_GA(N, Ret) -> =_IN_AG(X, N) U17_GA(N, Ret, =_out_ag(X, N)) -> U18_GA(N, Ret, X, =_in_ag(X1, succ(zero))) U17_GA(N, Ret, =_out_ag(X, N)) -> =_IN_AG(X1, succ(zero)) U18_GA(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_GA(N, Ret, =_in_gg(X, X1)) U18_GA(N, Ret, X, =_out_ag(X1, succ(zero))) -> =_IN_GG(X, X1) U19_GA(N, Ret, =_out_gg(X, X1)) -> U20_GA(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) U19_GA(N, Ret, =_out_gg(X, X1)) -> USER_DEFINED_IS_IN_AG(Ret, succ(zero)) HANOI_IN_GA(N, Ret) -> U21_GA(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, succ(zero)), Ret1) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_G(N, isLess_in_gg(X3, X4)) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> ISLESS_IN_GG(X3, X4) ISLESS_IN_GG(pred(X), pred(Y)) -> U57_GG(X, Y, isLess_in_gg(X, Y)) ISLESS_IN_GG(pred(X), pred(Y)) -> ISLESS_IN_GG(X, Y) ISLESS_IN_GG(succ(X), succ(Y)) -> U58_GG(X, Y, isLess_in_gg(X, Y)) ISLESS_IN_GG(succ(X), succ(Y)) -> ISLESS_IN_GG(X, Y) U8_G(N, isLess_out_gg(X3, X4)) -> U9_G(N, hanoi_in_ga(N, X1)) U8_G(N, isLess_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) U2_G(N, X, =_out_ag(X2, succ(zero))) -> U10_G(N, =_in_gg(X, X2)) U2_G(N, X, =_out_ag(X2, succ(zero))) -> =_IN_GG(X, X2) U10_G(N, =_out_gg(X, X2)) -> U11_G(N, =_in_ag(X3, N)) U10_G(N, =_out_gg(X, X2)) -> =_IN_AG(X3, N) U11_G(N, =_out_ag(X3, N)) -> U12_G(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U11_G(N, =_out_ag(X3, N)) -> =_IN_AG(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_G(N, =_in_gg(X3, X4)) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> =_IN_GG(X3, X4) U13_G(N, =_out_gg(X3, X4)) -> U14_G(N, hanoi_in_ga(N, X1)) U13_G(N, =_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_G(N, isLess_in_gg(X3, X4)) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> ISLESS_IN_GG(X3, X4) U15_G(N, isLess_out_gg(X3, X4)) -> U16_G(N, hanoi_in_ga(N, X1)) U15_G(N, isLess_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, =_in_ag(X, N)) =_in_ag(X, X) -> =_out_ag(X, X) U1_g(N, =_out_ag(X, N)) -> U2_g(N, X, =_in_ag(X2, succ(zero))) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U3_g(N, isGreater_in_gg(X, X2)) 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)) -> U55_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)) -> U56_gg(X, Y, isGreater_in_gg(X, Y)) U56_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U55_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U3_g(N, isGreater_out_gg(X, X2)) -> U4_g(N, =_in_ag(X3, N)) U4_g(N, =_out_ag(X3, N)) -> U5_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_g(N, =_in_gg(X3, X4)) =_in_gg(X, X) -> =_out_gg(X, X) U6_g(N, =_out_gg(X3, X4)) -> U7_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U17_ga(N, Ret, =_in_ag(X, N)) U17_ga(N, Ret, =_out_ag(X, N)) -> U18_ga(N, Ret, X, =_in_ag(X1, succ(zero))) U18_ga(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_ga(N, Ret, =_in_gg(X, X1)) U19_ga(N, Ret, =_out_gg(X, X1)) -> U20_ga(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) user_defined_is_in_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) -> user_defined_is_out_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) U20_ga(N, Ret, user_defined_is_out_ag(Ret, succ(zero))) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U21_ga(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) U21_ga(N, Ret, hanoi_out_ga(-(N, succ(zero)), Ret1)) -> hanoi_out_ga(N, Ret) U7_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_g(N, isLess_in_gg(X3, X4)) isLess_in_gg(pred(X), zero) -> isLess_out_gg(pred(X), zero) isLess_in_gg(pred(X), succ(Y)) -> isLess_out_gg(pred(X), succ(Y)) isLess_in_gg(pred(X), pred(Y)) -> U57_gg(X, Y, isLess_in_gg(X, Y)) isLess_in_gg(zero, succ(Y)) -> isLess_out_gg(zero, succ(Y)) isLess_in_gg(succ(X), succ(Y)) -> U58_gg(X, Y, isLess_in_gg(X, Y)) U58_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(succ(X), succ(Y)) U57_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(pred(X), pred(Y)) U8_g(N, isLess_out_gg(X3, X4)) -> U9_g(N, hanoi_in_ga(N, X1)) U9_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U10_g(N, =_in_gg(X, X2)) U10_g(N, =_out_gg(X, X2)) -> U11_g(N, =_in_ag(X3, N)) U11_g(N, =_out_ag(X3, N)) -> U12_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_g(N, =_in_gg(X3, X4)) U13_g(N, =_out_gg(X3, X4)) -> U14_g(N, hanoi_in_ga(N, X1)) U14_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_g(N, isLess_in_gg(X3, X4)) U15_g(N, isLess_out_gg(X3, X4)) -> U16_g(N, hanoi_in_ga(N, X1)) U16_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1, x2) U2_g(x1, x2, x3) = U2_g(x1, x2, x3) succ(x1) = succ(x1) zero = zero U3_g(x1, x2) = U3_g(x1, x2) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg(x1, x2) pred(x1) = pred(x1) U55_gg(x1, x2, x3) = U55_gg(x1, x2, x3) U56_gg(x1, x2, x3) = U56_gg(x1, x2, x3) U4_g(x1, x2) = U4_g(x1, x2) U5_g(x1, x2, x3) = U5_g(x1, x2, x3) U6_g(x1, x2) = U6_g(x1, x2) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg(x1, x2) U7_g(x1, x2) = U7_g(x1, x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U17_ga(x1, x2, x3) = U17_ga(x1, x3) U18_ga(x1, x2, x3, x4) = U18_ga(x1, x3, x4) U19_ga(x1, x2, x3) = U19_ga(x1, x3) U20_ga(x1, x2, x3) = U20_ga(x1, x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag(x2) hanoi_out_ga(x1, x2) = hanoi_out_ga(x1) U21_ga(x1, x2, x3) = U21_ga(x1, x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g(x1) U8_g(x1, x2) = U8_g(x1, x2) isLess_in_gg(x1, x2) = isLess_in_gg(x1, x2) isLess_out_gg(x1, x2) = isLess_out_gg(x1, x2) U57_gg(x1, x2, x3) = U57_gg(x1, x2, x3) U58_gg(x1, x2, x3) = U58_gg(x1, x2, x3) U9_g(x1, x2) = U9_g(x1, x2) U10_g(x1, x2) = U10_g(x1, x2) U11_g(x1, x2) = U11_g(x1, x2) U12_g(x1, x2, x3) = U12_g(x1, x2, x3) U13_g(x1, x2) = U13_g(x1, x2) U14_g(x1, x2) = U14_g(x1, x2) U15_g(x1, x2) = U15_g(x1, x2) U16_g(x1, x2) = U16_g(x1, x2) MAIN_IN_G(x1) = MAIN_IN_G(x1) U1_G(x1, x2) = U1_G(x1, x2) =_IN_AG(x1, x2) = =_IN_AG(x2) U2_G(x1, x2, x3) = U2_G(x1, x2, x3) U3_G(x1, x2) = U3_G(x1, x2) ISGREATER_IN_GG(x1, x2) = ISGREATER_IN_GG(x1, x2) U55_GG(x1, x2, x3) = U55_GG(x1, x2, x3) U56_GG(x1, x2, x3) = U56_GG(x1, x2, x3) U4_G(x1, x2) = U4_G(x1, x2) U5_G(x1, x2, x3) = U5_G(x1, x2, x3) U6_G(x1, x2) = U6_G(x1, x2) =_IN_GG(x1, x2) = =_IN_GG(x1, x2) U7_G(x1, x2) = U7_G(x1, x2) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) U17_GA(x1, x2, x3) = U17_GA(x1, x3) U18_GA(x1, x2, x3, x4) = U18_GA(x1, x3, x4) U19_GA(x1, x2, x3) = U19_GA(x1, x3) U20_GA(x1, x2, x3) = U20_GA(x1, x3) USER_DEFINED_IS_IN_AG(x1, x2) = USER_DEFINED_IS_IN_AG(x2) U21_GA(x1, x2, x3) = U21_GA(x1, x3) U8_G(x1, x2) = U8_G(x1, x2) ISLESS_IN_GG(x1, x2) = ISLESS_IN_GG(x1, x2) U57_GG(x1, x2, x3) = U57_GG(x1, x2, x3) U58_GG(x1, x2, x3) = U58_GG(x1, x2, x3) U9_G(x1, x2) = U9_G(x1, x2) U10_G(x1, x2) = U10_G(x1, x2) U11_G(x1, x2) = U11_G(x1, x2) U12_G(x1, x2, x3) = U12_G(x1, x2, x3) U13_G(x1, x2) = U13_G(x1, x2) U14_G(x1, x2) = U14_G(x1, x2) U15_G(x1, x2) = U15_G(x1, x2) U16_G(x1, x2) = U16_G(x1, x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (15) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 45 less nodes. ---------------------------------------- (16) Complex Obligation (AND) ---------------------------------------- (17) Obligation: Pi DP problem: The TRS P consists of the following rules: ISLESS_IN_GG(succ(X), succ(Y)) -> ISLESS_IN_GG(X, Y) ISLESS_IN_GG(pred(X), pred(Y)) -> ISLESS_IN_GG(X, Y) The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, =_in_ag(X, N)) =_in_ag(X, X) -> =_out_ag(X, X) U1_g(N, =_out_ag(X, N)) -> U2_g(N, X, =_in_ag(X2, succ(zero))) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U3_g(N, isGreater_in_gg(X, X2)) 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)) -> U55_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)) -> U56_gg(X, Y, isGreater_in_gg(X, Y)) U56_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U55_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U3_g(N, isGreater_out_gg(X, X2)) -> U4_g(N, =_in_ag(X3, N)) U4_g(N, =_out_ag(X3, N)) -> U5_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_g(N, =_in_gg(X3, X4)) =_in_gg(X, X) -> =_out_gg(X, X) U6_g(N, =_out_gg(X3, X4)) -> U7_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U17_ga(N, Ret, =_in_ag(X, N)) U17_ga(N, Ret, =_out_ag(X, N)) -> U18_ga(N, Ret, X, =_in_ag(X1, succ(zero))) U18_ga(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_ga(N, Ret, =_in_gg(X, X1)) U19_ga(N, Ret, =_out_gg(X, X1)) -> U20_ga(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) user_defined_is_in_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) -> user_defined_is_out_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) U20_ga(N, Ret, user_defined_is_out_ag(Ret, succ(zero))) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U21_ga(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) U21_ga(N, Ret, hanoi_out_ga(-(N, succ(zero)), Ret1)) -> hanoi_out_ga(N, Ret) U7_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_g(N, isLess_in_gg(X3, X4)) isLess_in_gg(pred(X), zero) -> isLess_out_gg(pred(X), zero) isLess_in_gg(pred(X), succ(Y)) -> isLess_out_gg(pred(X), succ(Y)) isLess_in_gg(pred(X), pred(Y)) -> U57_gg(X, Y, isLess_in_gg(X, Y)) isLess_in_gg(zero, succ(Y)) -> isLess_out_gg(zero, succ(Y)) isLess_in_gg(succ(X), succ(Y)) -> U58_gg(X, Y, isLess_in_gg(X, Y)) U58_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(succ(X), succ(Y)) U57_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(pred(X), pred(Y)) U8_g(N, isLess_out_gg(X3, X4)) -> U9_g(N, hanoi_in_ga(N, X1)) U9_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U10_g(N, =_in_gg(X, X2)) U10_g(N, =_out_gg(X, X2)) -> U11_g(N, =_in_ag(X3, N)) U11_g(N, =_out_ag(X3, N)) -> U12_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_g(N, =_in_gg(X3, X4)) U13_g(N, =_out_gg(X3, X4)) -> U14_g(N, hanoi_in_ga(N, X1)) U14_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_g(N, isLess_in_gg(X3, X4)) U15_g(N, isLess_out_gg(X3, X4)) -> U16_g(N, hanoi_in_ga(N, X1)) U16_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1, x2) U2_g(x1, x2, x3) = U2_g(x1, x2, x3) succ(x1) = succ(x1) zero = zero U3_g(x1, x2) = U3_g(x1, x2) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg(x1, x2) pred(x1) = pred(x1) U55_gg(x1, x2, x3) = U55_gg(x1, x2, x3) U56_gg(x1, x2, x3) = U56_gg(x1, x2, x3) U4_g(x1, x2) = U4_g(x1, x2) U5_g(x1, x2, x3) = U5_g(x1, x2, x3) U6_g(x1, x2) = U6_g(x1, x2) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg(x1, x2) U7_g(x1, x2) = U7_g(x1, x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U17_ga(x1, x2, x3) = U17_ga(x1, x3) U18_ga(x1, x2, x3, x4) = U18_ga(x1, x3, x4) U19_ga(x1, x2, x3) = U19_ga(x1, x3) U20_ga(x1, x2, x3) = U20_ga(x1, x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag(x2) hanoi_out_ga(x1, x2) = hanoi_out_ga(x1) U21_ga(x1, x2, x3) = U21_ga(x1, x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g(x1) U8_g(x1, x2) = U8_g(x1, x2) isLess_in_gg(x1, x2) = isLess_in_gg(x1, x2) isLess_out_gg(x1, x2) = isLess_out_gg(x1, x2) U57_gg(x1, x2, x3) = U57_gg(x1, x2, x3) U58_gg(x1, x2, x3) = U58_gg(x1, x2, x3) U9_g(x1, x2) = U9_g(x1, x2) U10_g(x1, x2) = U10_g(x1, x2) U11_g(x1, x2) = U11_g(x1, x2) U12_g(x1, x2, x3) = U12_g(x1, x2, x3) U13_g(x1, x2) = U13_g(x1, x2) U14_g(x1, x2) = U14_g(x1, x2) U15_g(x1, x2) = U15_g(x1, x2) U16_g(x1, x2) = U16_g(x1, x2) ISLESS_IN_GG(x1, x2) = ISLESS_IN_GG(x1, x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (18) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (19) Obligation: Pi DP problem: The TRS P consists of the following rules: ISLESS_IN_GG(succ(X), succ(Y)) -> ISLESS_IN_GG(X, Y) ISLESS_IN_GG(pred(X), pred(Y)) -> ISLESS_IN_GG(X, Y) R is empty. Pi is empty. We have to consider all (P,R,Pi)-chains ---------------------------------------- (20) PiDPToQDPProof (EQUIVALENT) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (21) Obligation: Q DP problem: The TRS P consists of the following rules: ISLESS_IN_GG(succ(X), succ(Y)) -> ISLESS_IN_GG(X, Y) ISLESS_IN_GG(pred(X), pred(Y)) -> ISLESS_IN_GG(X, Y) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (22) 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: *ISLESS_IN_GG(succ(X), succ(Y)) -> ISLESS_IN_GG(X, Y) The graph contains the following edges 1 > 1, 2 > 2 *ISLESS_IN_GG(pred(X), pred(Y)) -> ISLESS_IN_GG(X, Y) The graph contains the following edges 1 > 1, 2 > 2 ---------------------------------------- (23) YES ---------------------------------------- (24) Obligation: Pi DP problem: The TRS P consists of the following rules: HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, succ(zero)), Ret1) The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, =_in_ag(X, N)) =_in_ag(X, X) -> =_out_ag(X, X) U1_g(N, =_out_ag(X, N)) -> U2_g(N, X, =_in_ag(X2, succ(zero))) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U3_g(N, isGreater_in_gg(X, X2)) 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)) -> U55_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)) -> U56_gg(X, Y, isGreater_in_gg(X, Y)) U56_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U55_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U3_g(N, isGreater_out_gg(X, X2)) -> U4_g(N, =_in_ag(X3, N)) U4_g(N, =_out_ag(X3, N)) -> U5_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_g(N, =_in_gg(X3, X4)) =_in_gg(X, X) -> =_out_gg(X, X) U6_g(N, =_out_gg(X3, X4)) -> U7_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U17_ga(N, Ret, =_in_ag(X, N)) U17_ga(N, Ret, =_out_ag(X, N)) -> U18_ga(N, Ret, X, =_in_ag(X1, succ(zero))) U18_ga(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_ga(N, Ret, =_in_gg(X, X1)) U19_ga(N, Ret, =_out_gg(X, X1)) -> U20_ga(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) user_defined_is_in_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) -> user_defined_is_out_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) U20_ga(N, Ret, user_defined_is_out_ag(Ret, succ(zero))) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U21_ga(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) U21_ga(N, Ret, hanoi_out_ga(-(N, succ(zero)), Ret1)) -> hanoi_out_ga(N, Ret) U7_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_g(N, isLess_in_gg(X3, X4)) isLess_in_gg(pred(X), zero) -> isLess_out_gg(pred(X), zero) isLess_in_gg(pred(X), succ(Y)) -> isLess_out_gg(pred(X), succ(Y)) isLess_in_gg(pred(X), pred(Y)) -> U57_gg(X, Y, isLess_in_gg(X, Y)) isLess_in_gg(zero, succ(Y)) -> isLess_out_gg(zero, succ(Y)) isLess_in_gg(succ(X), succ(Y)) -> U58_gg(X, Y, isLess_in_gg(X, Y)) U58_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(succ(X), succ(Y)) U57_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(pred(X), pred(Y)) U8_g(N, isLess_out_gg(X3, X4)) -> U9_g(N, hanoi_in_ga(N, X1)) U9_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U10_g(N, =_in_gg(X, X2)) U10_g(N, =_out_gg(X, X2)) -> U11_g(N, =_in_ag(X3, N)) U11_g(N, =_out_ag(X3, N)) -> U12_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_g(N, =_in_gg(X3, X4)) U13_g(N, =_out_gg(X3, X4)) -> U14_g(N, hanoi_in_ga(N, X1)) U14_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_g(N, isLess_in_gg(X3, X4)) U15_g(N, isLess_out_gg(X3, X4)) -> U16_g(N, hanoi_in_ga(N, X1)) U16_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1, x2) U2_g(x1, x2, x3) = U2_g(x1, x2, x3) succ(x1) = succ(x1) zero = zero U3_g(x1, x2) = U3_g(x1, x2) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg(x1, x2) pred(x1) = pred(x1) U55_gg(x1, x2, x3) = U55_gg(x1, x2, x3) U56_gg(x1, x2, x3) = U56_gg(x1, x2, x3) U4_g(x1, x2) = U4_g(x1, x2) U5_g(x1, x2, x3) = U5_g(x1, x2, x3) U6_g(x1, x2) = U6_g(x1, x2) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg(x1, x2) U7_g(x1, x2) = U7_g(x1, x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U17_ga(x1, x2, x3) = U17_ga(x1, x3) U18_ga(x1, x2, x3, x4) = U18_ga(x1, x3, x4) U19_ga(x1, x2, x3) = U19_ga(x1, x3) U20_ga(x1, x2, x3) = U20_ga(x1, x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag(x2) hanoi_out_ga(x1, x2) = hanoi_out_ga(x1) U21_ga(x1, x2, x3) = U21_ga(x1, x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g(x1) U8_g(x1, x2) = U8_g(x1, x2) isLess_in_gg(x1, x2) = isLess_in_gg(x1, x2) isLess_out_gg(x1, x2) = isLess_out_gg(x1, x2) U57_gg(x1, x2, x3) = U57_gg(x1, x2, x3) U58_gg(x1, x2, x3) = U58_gg(x1, x2, x3) U9_g(x1, x2) = U9_g(x1, x2) U10_g(x1, x2) = U10_g(x1, x2) U11_g(x1, x2) = U11_g(x1, x2) U12_g(x1, x2, x3) = U12_g(x1, x2, x3) U13_g(x1, x2) = U13_g(x1, x2) U14_g(x1, x2) = U14_g(x1, x2) U15_g(x1, x2) = U15_g(x1, x2) U16_g(x1, x2) = U16_g(x1, x2) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) We have to consider all (P,R,Pi)-chains ---------------------------------------- (25) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (26) Obligation: Pi DP problem: The TRS P consists of the following rules: HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, succ(zero)), Ret1) R is empty. The argument filtering Pi contains the following mapping: succ(x1) = succ(x1) zero = zero -(x1, x2) = -(x1, x2) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) We have to consider all (P,R,Pi)-chains ---------------------------------------- (27) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (28) Obligation: Q DP problem: The TRS P consists of the following rules: HANOI_IN_GA(N) -> HANOI_IN_GA(-(N, succ(zero))) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (29) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule HANOI_IN_GA(N) -> HANOI_IN_GA(-(N, succ(zero))) we obtained the following new rules [LPAR04]: (HANOI_IN_GA(-(z0, succ(zero))) -> HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))),HANOI_IN_GA(-(z0, succ(zero))) -> HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero)))) ---------------------------------------- (30) Obligation: Q DP problem: The TRS P consists of the following rules: HANOI_IN_GA(-(z0, succ(zero))) -> HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (31) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule HANOI_IN_GA(-(z0, succ(zero))) -> HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))) we obtained the following new rules [LPAR04]: (HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))) -> HANOI_IN_GA(-(-(-(z0, succ(zero)), succ(zero)), succ(zero))),HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))) -> HANOI_IN_GA(-(-(-(z0, succ(zero)), succ(zero)), succ(zero)))) ---------------------------------------- (32) Obligation: Q DP problem: The TRS P consists of the following rules: HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))) -> HANOI_IN_GA(-(-(-(z0, succ(zero)), succ(zero)), succ(zero))) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (33) NonTerminationLoopProof (COMPLETE) We used the non-termination processor [FROCOS05] to show that the DP problem is infinite. Found a loop by semiunifying a rule from P directly. s = HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))) evaluates to t =HANOI_IN_GA(-(-(-(z0, succ(zero)), succ(zero)), succ(zero))) Thus s starts an infinite chain as s semiunifies with t with the following substitutions: * Matcher: [z0 / -(z0, succ(zero))] * Semiunifier: [ ] -------------------------------------------------------------------------------- Rewriting sequence The DP semiunifies directly so there is only one rewrite step from HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))) to HANOI_IN_GA(-(-(-(z0, succ(zero)), succ(zero)), succ(zero))). ---------------------------------------- (34) NO ---------------------------------------- (35) 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: main_in_g(N) -> U1_g(N, =_in_ag(X, N)) =_in_ag(X, X) -> =_out_ag(X, X) U1_g(N, =_out_ag(X, N)) -> U2_g(N, X, =_in_ag(X2, succ(zero))) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U3_g(N, isGreater_in_gg(X, X2)) 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)) -> U55_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)) -> U56_gg(X, Y, isGreater_in_gg(X, Y)) U56_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U55_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U3_g(N, isGreater_out_gg(X, X2)) -> U4_g(N, =_in_ag(X3, N)) U4_g(N, =_out_ag(X3, N)) -> U5_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_g(N, =_in_gg(X3, X4)) =_in_gg(X, X) -> =_out_gg(X, X) U6_g(N, =_out_gg(X3, X4)) -> U7_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U17_ga(N, Ret, =_in_ag(X, N)) U17_ga(N, Ret, =_out_ag(X, N)) -> U18_ga(N, Ret, X, =_in_ag(X1, succ(zero))) U18_ga(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_ga(N, Ret, =_in_gg(X, X1)) U19_ga(N, Ret, =_out_gg(X, X1)) -> U20_ga(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) user_defined_is_in_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) -> user_defined_is_out_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) U20_ga(N, Ret, user_defined_is_out_ag(Ret, succ(zero))) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U21_ga(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) U21_ga(N, Ret, hanoi_out_ga(-(N, succ(zero)), Ret1)) -> hanoi_out_ga(N, Ret) U7_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_g(N, isLess_in_gg(X3, X4)) isLess_in_gg(pred(X), zero) -> isLess_out_gg(pred(X), zero) isLess_in_gg(pred(X), succ(Y)) -> isLess_out_gg(pred(X), succ(Y)) isLess_in_gg(pred(X), pred(Y)) -> U57_gg(X, Y, isLess_in_gg(X, Y)) isLess_in_gg(zero, succ(Y)) -> isLess_out_gg(zero, succ(Y)) isLess_in_gg(succ(X), succ(Y)) -> U58_gg(X, Y, isLess_in_gg(X, Y)) U58_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(succ(X), succ(Y)) U57_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(pred(X), pred(Y)) U8_g(N, isLess_out_gg(X3, X4)) -> U9_g(N, hanoi_in_ga(N, X1)) U9_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U10_g(N, =_in_gg(X, X2)) U10_g(N, =_out_gg(X, X2)) -> U11_g(N, =_in_ag(X3, N)) U11_g(N, =_out_ag(X3, N)) -> U12_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_g(N, =_in_gg(X3, X4)) U13_g(N, =_out_gg(X3, X4)) -> U14_g(N, hanoi_in_ga(N, X1)) U14_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_g(N, isLess_in_gg(X3, X4)) U15_g(N, isLess_out_gg(X3, X4)) -> U16_g(N, hanoi_in_ga(N, X1)) U16_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1, x2) U2_g(x1, x2, x3) = U2_g(x1, x2, x3) succ(x1) = succ(x1) zero = zero U3_g(x1, x2) = U3_g(x1, x2) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg(x1, x2) pred(x1) = pred(x1) U55_gg(x1, x2, x3) = U55_gg(x1, x2, x3) U56_gg(x1, x2, x3) = U56_gg(x1, x2, x3) U4_g(x1, x2) = U4_g(x1, x2) U5_g(x1, x2, x3) = U5_g(x1, x2, x3) U6_g(x1, x2) = U6_g(x1, x2) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg(x1, x2) U7_g(x1, x2) = U7_g(x1, x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U17_ga(x1, x2, x3) = U17_ga(x1, x3) U18_ga(x1, x2, x3, x4) = U18_ga(x1, x3, x4) U19_ga(x1, x2, x3) = U19_ga(x1, x3) U20_ga(x1, x2, x3) = U20_ga(x1, x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag(x2) hanoi_out_ga(x1, x2) = hanoi_out_ga(x1) U21_ga(x1, x2, x3) = U21_ga(x1, x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g(x1) U8_g(x1, x2) = U8_g(x1, x2) isLess_in_gg(x1, x2) = isLess_in_gg(x1, x2) isLess_out_gg(x1, x2) = isLess_out_gg(x1, x2) U57_gg(x1, x2, x3) = U57_gg(x1, x2, x3) U58_gg(x1, x2, x3) = U58_gg(x1, x2, x3) U9_g(x1, x2) = U9_g(x1, x2) U10_g(x1, x2) = U10_g(x1, x2) U11_g(x1, x2) = U11_g(x1, x2) U12_g(x1, x2, x3) = U12_g(x1, x2, x3) U13_g(x1, x2) = U13_g(x1, x2) U14_g(x1, x2) = U14_g(x1, x2) U15_g(x1, x2) = U15_g(x1, x2) U16_g(x1, x2) = U16_g(x1, x2) ISGREATER_IN_GG(x1, x2) = ISGREATER_IN_GG(x1, x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (36) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (37) 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 ---------------------------------------- (38) PiDPToQDPProof (EQUIVALENT) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (39) 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. ---------------------------------------- (40) 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 ---------------------------------------- (41) YES ---------------------------------------- (42) PrologToPiTRSProof (SOUND) We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: main_in_1: (b) isGreater_in_2: (b,b) hanoi_in_2: (b,f) isLess_in_2: (b,b) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, =_in_ag(X, N)) =_in_ag(X, X) -> =_out_ag(X, X) U1_g(N, =_out_ag(X, N)) -> U2_g(N, X, =_in_ag(X2, succ(zero))) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U3_g(N, isGreater_in_gg(X, X2)) 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)) -> U55_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)) -> U56_gg(X, Y, isGreater_in_gg(X, Y)) U56_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U55_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U3_g(N, isGreater_out_gg(X, X2)) -> U4_g(N, =_in_ag(X3, N)) U4_g(N, =_out_ag(X3, N)) -> U5_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_g(N, =_in_gg(X3, X4)) =_in_gg(X, X) -> =_out_gg(X, X) U6_g(N, =_out_gg(X3, X4)) -> U7_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U17_ga(N, Ret, =_in_ag(X, N)) U17_ga(N, Ret, =_out_ag(X, N)) -> U18_ga(N, Ret, X, =_in_ag(X1, succ(zero))) U18_ga(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_ga(N, Ret, =_in_gg(X, X1)) U19_ga(N, Ret, =_out_gg(X, X1)) -> U20_ga(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) user_defined_is_in_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) -> user_defined_is_out_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) U20_ga(N, Ret, user_defined_is_out_ag(Ret, succ(zero))) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U21_ga(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) U21_ga(N, Ret, hanoi_out_ga(-(N, succ(zero)), Ret1)) -> hanoi_out_ga(N, Ret) U7_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_g(N, isLess_in_gg(X3, X4)) isLess_in_gg(pred(X), zero) -> isLess_out_gg(pred(X), zero) isLess_in_gg(pred(X), succ(Y)) -> isLess_out_gg(pred(X), succ(Y)) isLess_in_gg(pred(X), pred(Y)) -> U57_gg(X, Y, isLess_in_gg(X, Y)) isLess_in_gg(zero, succ(Y)) -> isLess_out_gg(zero, succ(Y)) isLess_in_gg(succ(X), succ(Y)) -> U58_gg(X, Y, isLess_in_gg(X, Y)) U58_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(succ(X), succ(Y)) U57_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(pred(X), pred(Y)) U8_g(N, isLess_out_gg(X3, X4)) -> U9_g(N, hanoi_in_ga(N, X1)) U9_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U10_g(N, =_in_gg(X, X2)) U10_g(N, =_out_gg(X, X2)) -> U11_g(N, =_in_ag(X3, N)) U11_g(N, =_out_ag(X3, N)) -> U12_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_g(N, =_in_gg(X3, X4)) U13_g(N, =_out_gg(X3, X4)) -> U14_g(N, hanoi_in_ga(N, X1)) U14_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_g(N, isLess_in_gg(X3, X4)) U15_g(N, isLess_out_gg(X3, X4)) -> U16_g(N, hanoi_in_ga(N, X1)) U16_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U2_g(x1, x2, x3) = U2_g(x1, x2, x3) succ(x1) = succ(x1) zero = zero U3_g(x1, x2) = U3_g(x1, x2) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U55_gg(x1, x2, x3) = U55_gg(x3) U56_gg(x1, x2, x3) = U56_gg(x3) U4_g(x1, x2) = U4_g(x1, x2) U5_g(x1, x2, x3) = U5_g(x1, x2, x3) U6_g(x1, x2) = U6_g(x1, x2) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg U7_g(x1, x2) = U7_g(x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U17_ga(x1, x2, x3) = U17_ga(x3) U18_ga(x1, x2, x3, x4) = U18_ga(x3, x4) U19_ga(x1, x2, x3) = U19_ga(x3) U20_ga(x1, x2, x3) = U20_ga(x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag hanoi_out_ga(x1, x2) = hanoi_out_ga U21_ga(x1, x2, x3) = U21_ga(x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g U8_g(x1, x2) = U8_g(x1, x2) isLess_in_gg(x1, x2) = isLess_in_gg(x1, x2) isLess_out_gg(x1, x2) = isLess_out_gg U57_gg(x1, x2, x3) = U57_gg(x3) U58_gg(x1, x2, x3) = U58_gg(x3) U9_g(x1, x2) = U9_g(x2) U10_g(x1, x2) = U10_g(x1, x2) U11_g(x1, x2) = U11_g(x1, x2) U12_g(x1, x2, x3) = U12_g(x1, x2, x3) U13_g(x1, x2) = U13_g(x1, x2) U14_g(x1, x2) = U14_g(x2) U15_g(x1, x2) = U15_g(x1, x2) U16_g(x1, x2) = U16_g(x2) Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog ---------------------------------------- (43) Obligation: Pi-finite rewrite system: The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, =_in_ag(X, N)) =_in_ag(X, X) -> =_out_ag(X, X) U1_g(N, =_out_ag(X, N)) -> U2_g(N, X, =_in_ag(X2, succ(zero))) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U3_g(N, isGreater_in_gg(X, X2)) 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)) -> U55_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)) -> U56_gg(X, Y, isGreater_in_gg(X, Y)) U56_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U55_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U3_g(N, isGreater_out_gg(X, X2)) -> U4_g(N, =_in_ag(X3, N)) U4_g(N, =_out_ag(X3, N)) -> U5_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_g(N, =_in_gg(X3, X4)) =_in_gg(X, X) -> =_out_gg(X, X) U6_g(N, =_out_gg(X3, X4)) -> U7_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U17_ga(N, Ret, =_in_ag(X, N)) U17_ga(N, Ret, =_out_ag(X, N)) -> U18_ga(N, Ret, X, =_in_ag(X1, succ(zero))) U18_ga(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_ga(N, Ret, =_in_gg(X, X1)) U19_ga(N, Ret, =_out_gg(X, X1)) -> U20_ga(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) user_defined_is_in_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) -> user_defined_is_out_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) U20_ga(N, Ret, user_defined_is_out_ag(Ret, succ(zero))) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U21_ga(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) U21_ga(N, Ret, hanoi_out_ga(-(N, succ(zero)), Ret1)) -> hanoi_out_ga(N, Ret) U7_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_g(N, isLess_in_gg(X3, X4)) isLess_in_gg(pred(X), zero) -> isLess_out_gg(pred(X), zero) isLess_in_gg(pred(X), succ(Y)) -> isLess_out_gg(pred(X), succ(Y)) isLess_in_gg(pred(X), pred(Y)) -> U57_gg(X, Y, isLess_in_gg(X, Y)) isLess_in_gg(zero, succ(Y)) -> isLess_out_gg(zero, succ(Y)) isLess_in_gg(succ(X), succ(Y)) -> U58_gg(X, Y, isLess_in_gg(X, Y)) U58_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(succ(X), succ(Y)) U57_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(pred(X), pred(Y)) U8_g(N, isLess_out_gg(X3, X4)) -> U9_g(N, hanoi_in_ga(N, X1)) U9_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U10_g(N, =_in_gg(X, X2)) U10_g(N, =_out_gg(X, X2)) -> U11_g(N, =_in_ag(X3, N)) U11_g(N, =_out_ag(X3, N)) -> U12_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_g(N, =_in_gg(X3, X4)) U13_g(N, =_out_gg(X3, X4)) -> U14_g(N, hanoi_in_ga(N, X1)) U14_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_g(N, isLess_in_gg(X3, X4)) U15_g(N, isLess_out_gg(X3, X4)) -> U16_g(N, hanoi_in_ga(N, X1)) U16_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U2_g(x1, x2, x3) = U2_g(x1, x2, x3) succ(x1) = succ(x1) zero = zero U3_g(x1, x2) = U3_g(x1, x2) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U55_gg(x1, x2, x3) = U55_gg(x3) U56_gg(x1, x2, x3) = U56_gg(x3) U4_g(x1, x2) = U4_g(x1, x2) U5_g(x1, x2, x3) = U5_g(x1, x2, x3) U6_g(x1, x2) = U6_g(x1, x2) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg U7_g(x1, x2) = U7_g(x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U17_ga(x1, x2, x3) = U17_ga(x3) U18_ga(x1, x2, x3, x4) = U18_ga(x3, x4) U19_ga(x1, x2, x3) = U19_ga(x3) U20_ga(x1, x2, x3) = U20_ga(x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag hanoi_out_ga(x1, x2) = hanoi_out_ga U21_ga(x1, x2, x3) = U21_ga(x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g U8_g(x1, x2) = U8_g(x1, x2) isLess_in_gg(x1, x2) = isLess_in_gg(x1, x2) isLess_out_gg(x1, x2) = isLess_out_gg U57_gg(x1, x2, x3) = U57_gg(x3) U58_gg(x1, x2, x3) = U58_gg(x3) U9_g(x1, x2) = U9_g(x2) U10_g(x1, x2) = U10_g(x1, x2) U11_g(x1, x2) = U11_g(x1, x2) U12_g(x1, x2, x3) = U12_g(x1, x2, x3) U13_g(x1, x2) = U13_g(x1, x2) U14_g(x1, x2) = U14_g(x2) U15_g(x1, x2) = U15_g(x1, x2) U16_g(x1, x2) = U16_g(x2) ---------------------------------------- (44) 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: MAIN_IN_G(N) -> U1_G(N, =_in_ag(X, N)) MAIN_IN_G(N) -> =_IN_AG(X, N) U1_G(N, =_out_ag(X, N)) -> U2_G(N, X, =_in_ag(X2, succ(zero))) U1_G(N, =_out_ag(X, N)) -> =_IN_AG(X2, succ(zero)) U2_G(N, X, =_out_ag(X2, succ(zero))) -> U3_G(N, isGreater_in_gg(X, X2)) U2_G(N, X, =_out_ag(X2, succ(zero))) -> ISGREATER_IN_GG(X, X2) ISGREATER_IN_GG(succ(X), succ(Y)) -> U55_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)) -> U56_GG(X, Y, isGreater_in_gg(X, Y)) ISGREATER_IN_GG(pred(X), pred(Y)) -> ISGREATER_IN_GG(X, Y) U3_G(N, isGreater_out_gg(X, X2)) -> U4_G(N, =_in_ag(X3, N)) U3_G(N, isGreater_out_gg(X, X2)) -> =_IN_AG(X3, N) U4_G(N, =_out_ag(X3, N)) -> U5_G(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U4_G(N, =_out_ag(X3, N)) -> =_IN_AG(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_G(N, =_in_gg(X3, X4)) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> =_IN_GG(X3, X4) U6_G(N, =_out_gg(X3, X4)) -> U7_G(N, hanoi_in_ga(N, X1)) U6_G(N, =_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) HANOI_IN_GA(N, Ret) -> U17_GA(N, Ret, =_in_ag(X, N)) HANOI_IN_GA(N, Ret) -> =_IN_AG(X, N) U17_GA(N, Ret, =_out_ag(X, N)) -> U18_GA(N, Ret, X, =_in_ag(X1, succ(zero))) U17_GA(N, Ret, =_out_ag(X, N)) -> =_IN_AG(X1, succ(zero)) U18_GA(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_GA(N, Ret, =_in_gg(X, X1)) U18_GA(N, Ret, X, =_out_ag(X1, succ(zero))) -> =_IN_GG(X, X1) U19_GA(N, Ret, =_out_gg(X, X1)) -> U20_GA(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) U19_GA(N, Ret, =_out_gg(X, X1)) -> USER_DEFINED_IS_IN_AG(Ret, succ(zero)) HANOI_IN_GA(N, Ret) -> U21_GA(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, succ(zero)), Ret1) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_G(N, isLess_in_gg(X3, X4)) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> ISLESS_IN_GG(X3, X4) ISLESS_IN_GG(pred(X), pred(Y)) -> U57_GG(X, Y, isLess_in_gg(X, Y)) ISLESS_IN_GG(pred(X), pred(Y)) -> ISLESS_IN_GG(X, Y) ISLESS_IN_GG(succ(X), succ(Y)) -> U58_GG(X, Y, isLess_in_gg(X, Y)) ISLESS_IN_GG(succ(X), succ(Y)) -> ISLESS_IN_GG(X, Y) U8_G(N, isLess_out_gg(X3, X4)) -> U9_G(N, hanoi_in_ga(N, X1)) U8_G(N, isLess_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) U2_G(N, X, =_out_ag(X2, succ(zero))) -> U10_G(N, =_in_gg(X, X2)) U2_G(N, X, =_out_ag(X2, succ(zero))) -> =_IN_GG(X, X2) U10_G(N, =_out_gg(X, X2)) -> U11_G(N, =_in_ag(X3, N)) U10_G(N, =_out_gg(X, X2)) -> =_IN_AG(X3, N) U11_G(N, =_out_ag(X3, N)) -> U12_G(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U11_G(N, =_out_ag(X3, N)) -> =_IN_AG(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_G(N, =_in_gg(X3, X4)) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> =_IN_GG(X3, X4) U13_G(N, =_out_gg(X3, X4)) -> U14_G(N, hanoi_in_ga(N, X1)) U13_G(N, =_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_G(N, isLess_in_gg(X3, X4)) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> ISLESS_IN_GG(X3, X4) U15_G(N, isLess_out_gg(X3, X4)) -> U16_G(N, hanoi_in_ga(N, X1)) U15_G(N, isLess_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, =_in_ag(X, N)) =_in_ag(X, X) -> =_out_ag(X, X) U1_g(N, =_out_ag(X, N)) -> U2_g(N, X, =_in_ag(X2, succ(zero))) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U3_g(N, isGreater_in_gg(X, X2)) 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)) -> U55_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)) -> U56_gg(X, Y, isGreater_in_gg(X, Y)) U56_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U55_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U3_g(N, isGreater_out_gg(X, X2)) -> U4_g(N, =_in_ag(X3, N)) U4_g(N, =_out_ag(X3, N)) -> U5_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_g(N, =_in_gg(X3, X4)) =_in_gg(X, X) -> =_out_gg(X, X) U6_g(N, =_out_gg(X3, X4)) -> U7_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U17_ga(N, Ret, =_in_ag(X, N)) U17_ga(N, Ret, =_out_ag(X, N)) -> U18_ga(N, Ret, X, =_in_ag(X1, succ(zero))) U18_ga(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_ga(N, Ret, =_in_gg(X, X1)) U19_ga(N, Ret, =_out_gg(X, X1)) -> U20_ga(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) user_defined_is_in_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) -> user_defined_is_out_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) U20_ga(N, Ret, user_defined_is_out_ag(Ret, succ(zero))) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U21_ga(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) U21_ga(N, Ret, hanoi_out_ga(-(N, succ(zero)), Ret1)) -> hanoi_out_ga(N, Ret) U7_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_g(N, isLess_in_gg(X3, X4)) isLess_in_gg(pred(X), zero) -> isLess_out_gg(pred(X), zero) isLess_in_gg(pred(X), succ(Y)) -> isLess_out_gg(pred(X), succ(Y)) isLess_in_gg(pred(X), pred(Y)) -> U57_gg(X, Y, isLess_in_gg(X, Y)) isLess_in_gg(zero, succ(Y)) -> isLess_out_gg(zero, succ(Y)) isLess_in_gg(succ(X), succ(Y)) -> U58_gg(X, Y, isLess_in_gg(X, Y)) U58_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(succ(X), succ(Y)) U57_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(pred(X), pred(Y)) U8_g(N, isLess_out_gg(X3, X4)) -> U9_g(N, hanoi_in_ga(N, X1)) U9_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U10_g(N, =_in_gg(X, X2)) U10_g(N, =_out_gg(X, X2)) -> U11_g(N, =_in_ag(X3, N)) U11_g(N, =_out_ag(X3, N)) -> U12_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_g(N, =_in_gg(X3, X4)) U13_g(N, =_out_gg(X3, X4)) -> U14_g(N, hanoi_in_ga(N, X1)) U14_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_g(N, isLess_in_gg(X3, X4)) U15_g(N, isLess_out_gg(X3, X4)) -> U16_g(N, hanoi_in_ga(N, X1)) U16_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U2_g(x1, x2, x3) = U2_g(x1, x2, x3) succ(x1) = succ(x1) zero = zero U3_g(x1, x2) = U3_g(x1, x2) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U55_gg(x1, x2, x3) = U55_gg(x3) U56_gg(x1, x2, x3) = U56_gg(x3) U4_g(x1, x2) = U4_g(x1, x2) U5_g(x1, x2, x3) = U5_g(x1, x2, x3) U6_g(x1, x2) = U6_g(x1, x2) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg U7_g(x1, x2) = U7_g(x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U17_ga(x1, x2, x3) = U17_ga(x3) U18_ga(x1, x2, x3, x4) = U18_ga(x3, x4) U19_ga(x1, x2, x3) = U19_ga(x3) U20_ga(x1, x2, x3) = U20_ga(x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag hanoi_out_ga(x1, x2) = hanoi_out_ga U21_ga(x1, x2, x3) = U21_ga(x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g U8_g(x1, x2) = U8_g(x1, x2) isLess_in_gg(x1, x2) = isLess_in_gg(x1, x2) isLess_out_gg(x1, x2) = isLess_out_gg U57_gg(x1, x2, x3) = U57_gg(x3) U58_gg(x1, x2, x3) = U58_gg(x3) U9_g(x1, x2) = U9_g(x2) U10_g(x1, x2) = U10_g(x1, x2) U11_g(x1, x2) = U11_g(x1, x2) U12_g(x1, x2, x3) = U12_g(x1, x2, x3) U13_g(x1, x2) = U13_g(x1, x2) U14_g(x1, x2) = U14_g(x2) U15_g(x1, x2) = U15_g(x1, x2) U16_g(x1, x2) = U16_g(x2) MAIN_IN_G(x1) = MAIN_IN_G(x1) U1_G(x1, x2) = U1_G(x1, x2) =_IN_AG(x1, x2) = =_IN_AG(x2) U2_G(x1, x2, x3) = U2_G(x1, x2, x3) U3_G(x1, x2) = U3_G(x1, x2) ISGREATER_IN_GG(x1, x2) = ISGREATER_IN_GG(x1, x2) U55_GG(x1, x2, x3) = U55_GG(x3) U56_GG(x1, x2, x3) = U56_GG(x3) U4_G(x1, x2) = U4_G(x1, x2) U5_G(x1, x2, x3) = U5_G(x1, x2, x3) U6_G(x1, x2) = U6_G(x1, x2) =_IN_GG(x1, x2) = =_IN_GG(x1, x2) U7_G(x1, x2) = U7_G(x2) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) U17_GA(x1, x2, x3) = U17_GA(x3) U18_GA(x1, x2, x3, x4) = U18_GA(x3, x4) U19_GA(x1, x2, x3) = U19_GA(x3) U20_GA(x1, x2, x3) = U20_GA(x3) USER_DEFINED_IS_IN_AG(x1, x2) = USER_DEFINED_IS_IN_AG(x2) U21_GA(x1, x2, x3) = U21_GA(x3) U8_G(x1, x2) = U8_G(x1, x2) ISLESS_IN_GG(x1, x2) = ISLESS_IN_GG(x1, x2) U57_GG(x1, x2, x3) = U57_GG(x3) U58_GG(x1, x2, x3) = U58_GG(x3) U9_G(x1, x2) = U9_G(x2) U10_G(x1, x2) = U10_G(x1, x2) U11_G(x1, x2) = U11_G(x1, x2) U12_G(x1, x2, x3) = U12_G(x1, x2, x3) U13_G(x1, x2) = U13_G(x1, x2) U14_G(x1, x2) = U14_G(x2) U15_G(x1, x2) = U15_G(x1, x2) U16_G(x1, x2) = U16_G(x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (45) Obligation: Pi DP problem: The TRS P consists of the following rules: MAIN_IN_G(N) -> U1_G(N, =_in_ag(X, N)) MAIN_IN_G(N) -> =_IN_AG(X, N) U1_G(N, =_out_ag(X, N)) -> U2_G(N, X, =_in_ag(X2, succ(zero))) U1_G(N, =_out_ag(X, N)) -> =_IN_AG(X2, succ(zero)) U2_G(N, X, =_out_ag(X2, succ(zero))) -> U3_G(N, isGreater_in_gg(X, X2)) U2_G(N, X, =_out_ag(X2, succ(zero))) -> ISGREATER_IN_GG(X, X2) ISGREATER_IN_GG(succ(X), succ(Y)) -> U55_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)) -> U56_GG(X, Y, isGreater_in_gg(X, Y)) ISGREATER_IN_GG(pred(X), pred(Y)) -> ISGREATER_IN_GG(X, Y) U3_G(N, isGreater_out_gg(X, X2)) -> U4_G(N, =_in_ag(X3, N)) U3_G(N, isGreater_out_gg(X, X2)) -> =_IN_AG(X3, N) U4_G(N, =_out_ag(X3, N)) -> U5_G(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U4_G(N, =_out_ag(X3, N)) -> =_IN_AG(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_G(N, =_in_gg(X3, X4)) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> =_IN_GG(X3, X4) U6_G(N, =_out_gg(X3, X4)) -> U7_G(N, hanoi_in_ga(N, X1)) U6_G(N, =_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) HANOI_IN_GA(N, Ret) -> U17_GA(N, Ret, =_in_ag(X, N)) HANOI_IN_GA(N, Ret) -> =_IN_AG(X, N) U17_GA(N, Ret, =_out_ag(X, N)) -> U18_GA(N, Ret, X, =_in_ag(X1, succ(zero))) U17_GA(N, Ret, =_out_ag(X, N)) -> =_IN_AG(X1, succ(zero)) U18_GA(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_GA(N, Ret, =_in_gg(X, X1)) U18_GA(N, Ret, X, =_out_ag(X1, succ(zero))) -> =_IN_GG(X, X1) U19_GA(N, Ret, =_out_gg(X, X1)) -> U20_GA(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) U19_GA(N, Ret, =_out_gg(X, X1)) -> USER_DEFINED_IS_IN_AG(Ret, succ(zero)) HANOI_IN_GA(N, Ret) -> U21_GA(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, succ(zero)), Ret1) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_G(N, isLess_in_gg(X3, X4)) U5_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> ISLESS_IN_GG(X3, X4) ISLESS_IN_GG(pred(X), pred(Y)) -> U57_GG(X, Y, isLess_in_gg(X, Y)) ISLESS_IN_GG(pred(X), pred(Y)) -> ISLESS_IN_GG(X, Y) ISLESS_IN_GG(succ(X), succ(Y)) -> U58_GG(X, Y, isLess_in_gg(X, Y)) ISLESS_IN_GG(succ(X), succ(Y)) -> ISLESS_IN_GG(X, Y) U8_G(N, isLess_out_gg(X3, X4)) -> U9_G(N, hanoi_in_ga(N, X1)) U8_G(N, isLess_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) U2_G(N, X, =_out_ag(X2, succ(zero))) -> U10_G(N, =_in_gg(X, X2)) U2_G(N, X, =_out_ag(X2, succ(zero))) -> =_IN_GG(X, X2) U10_G(N, =_out_gg(X, X2)) -> U11_G(N, =_in_ag(X3, N)) U10_G(N, =_out_gg(X, X2)) -> =_IN_AG(X3, N) U11_G(N, =_out_ag(X3, N)) -> U12_G(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U11_G(N, =_out_ag(X3, N)) -> =_IN_AG(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero)))))))))))))))))))))))))))))))) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_G(N, =_in_gg(X3, X4)) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> =_IN_GG(X3, X4) U13_G(N, =_out_gg(X3, X4)) -> U14_G(N, hanoi_in_ga(N, X1)) U13_G(N, =_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_G(N, isLess_in_gg(X3, X4)) U12_G(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> ISLESS_IN_GG(X3, X4) U15_G(N, isLess_out_gg(X3, X4)) -> U16_G(N, hanoi_in_ga(N, X1)) U15_G(N, isLess_out_gg(X3, X4)) -> HANOI_IN_GA(N, X1) The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, =_in_ag(X, N)) =_in_ag(X, X) -> =_out_ag(X, X) U1_g(N, =_out_ag(X, N)) -> U2_g(N, X, =_in_ag(X2, succ(zero))) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U3_g(N, isGreater_in_gg(X, X2)) 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)) -> U55_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)) -> U56_gg(X, Y, isGreater_in_gg(X, Y)) U56_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U55_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U3_g(N, isGreater_out_gg(X, X2)) -> U4_g(N, =_in_ag(X3, N)) U4_g(N, =_out_ag(X3, N)) -> U5_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_g(N, =_in_gg(X3, X4)) =_in_gg(X, X) -> =_out_gg(X, X) U6_g(N, =_out_gg(X3, X4)) -> U7_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U17_ga(N, Ret, =_in_ag(X, N)) U17_ga(N, Ret, =_out_ag(X, N)) -> U18_ga(N, Ret, X, =_in_ag(X1, succ(zero))) U18_ga(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_ga(N, Ret, =_in_gg(X, X1)) U19_ga(N, Ret, =_out_gg(X, X1)) -> U20_ga(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) user_defined_is_in_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) -> user_defined_is_out_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) U20_ga(N, Ret, user_defined_is_out_ag(Ret, succ(zero))) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U21_ga(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) U21_ga(N, Ret, hanoi_out_ga(-(N, succ(zero)), Ret1)) -> hanoi_out_ga(N, Ret) U7_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_g(N, isLess_in_gg(X3, X4)) isLess_in_gg(pred(X), zero) -> isLess_out_gg(pred(X), zero) isLess_in_gg(pred(X), succ(Y)) -> isLess_out_gg(pred(X), succ(Y)) isLess_in_gg(pred(X), pred(Y)) -> U57_gg(X, Y, isLess_in_gg(X, Y)) isLess_in_gg(zero, succ(Y)) -> isLess_out_gg(zero, succ(Y)) isLess_in_gg(succ(X), succ(Y)) -> U58_gg(X, Y, isLess_in_gg(X, Y)) U58_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(succ(X), succ(Y)) U57_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(pred(X), pred(Y)) U8_g(N, isLess_out_gg(X3, X4)) -> U9_g(N, hanoi_in_ga(N, X1)) U9_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U10_g(N, =_in_gg(X, X2)) U10_g(N, =_out_gg(X, X2)) -> U11_g(N, =_in_ag(X3, N)) U11_g(N, =_out_ag(X3, N)) -> U12_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_g(N, =_in_gg(X3, X4)) U13_g(N, =_out_gg(X3, X4)) -> U14_g(N, hanoi_in_ga(N, X1)) U14_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_g(N, isLess_in_gg(X3, X4)) U15_g(N, isLess_out_gg(X3, X4)) -> U16_g(N, hanoi_in_ga(N, X1)) U16_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U2_g(x1, x2, x3) = U2_g(x1, x2, x3) succ(x1) = succ(x1) zero = zero U3_g(x1, x2) = U3_g(x1, x2) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U55_gg(x1, x2, x3) = U55_gg(x3) U56_gg(x1, x2, x3) = U56_gg(x3) U4_g(x1, x2) = U4_g(x1, x2) U5_g(x1, x2, x3) = U5_g(x1, x2, x3) U6_g(x1, x2) = U6_g(x1, x2) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg U7_g(x1, x2) = U7_g(x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U17_ga(x1, x2, x3) = U17_ga(x3) U18_ga(x1, x2, x3, x4) = U18_ga(x3, x4) U19_ga(x1, x2, x3) = U19_ga(x3) U20_ga(x1, x2, x3) = U20_ga(x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag hanoi_out_ga(x1, x2) = hanoi_out_ga U21_ga(x1, x2, x3) = U21_ga(x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g U8_g(x1, x2) = U8_g(x1, x2) isLess_in_gg(x1, x2) = isLess_in_gg(x1, x2) isLess_out_gg(x1, x2) = isLess_out_gg U57_gg(x1, x2, x3) = U57_gg(x3) U58_gg(x1, x2, x3) = U58_gg(x3) U9_g(x1, x2) = U9_g(x2) U10_g(x1, x2) = U10_g(x1, x2) U11_g(x1, x2) = U11_g(x1, x2) U12_g(x1, x2, x3) = U12_g(x1, x2, x3) U13_g(x1, x2) = U13_g(x1, x2) U14_g(x1, x2) = U14_g(x2) U15_g(x1, x2) = U15_g(x1, x2) U16_g(x1, x2) = U16_g(x2) MAIN_IN_G(x1) = MAIN_IN_G(x1) U1_G(x1, x2) = U1_G(x1, x2) =_IN_AG(x1, x2) = =_IN_AG(x2) U2_G(x1, x2, x3) = U2_G(x1, x2, x3) U3_G(x1, x2) = U3_G(x1, x2) ISGREATER_IN_GG(x1, x2) = ISGREATER_IN_GG(x1, x2) U55_GG(x1, x2, x3) = U55_GG(x3) U56_GG(x1, x2, x3) = U56_GG(x3) U4_G(x1, x2) = U4_G(x1, x2) U5_G(x1, x2, x3) = U5_G(x1, x2, x3) U6_G(x1, x2) = U6_G(x1, x2) =_IN_GG(x1, x2) = =_IN_GG(x1, x2) U7_G(x1, x2) = U7_G(x2) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) U17_GA(x1, x2, x3) = U17_GA(x3) U18_GA(x1, x2, x3, x4) = U18_GA(x3, x4) U19_GA(x1, x2, x3) = U19_GA(x3) U20_GA(x1, x2, x3) = U20_GA(x3) USER_DEFINED_IS_IN_AG(x1, x2) = USER_DEFINED_IS_IN_AG(x2) U21_GA(x1, x2, x3) = U21_GA(x3) U8_G(x1, x2) = U8_G(x1, x2) ISLESS_IN_GG(x1, x2) = ISLESS_IN_GG(x1, x2) U57_GG(x1, x2, x3) = U57_GG(x3) U58_GG(x1, x2, x3) = U58_GG(x3) U9_G(x1, x2) = U9_G(x2) U10_G(x1, x2) = U10_G(x1, x2) U11_G(x1, x2) = U11_G(x1, x2) U12_G(x1, x2, x3) = U12_G(x1, x2, x3) U13_G(x1, x2) = U13_G(x1, x2) U14_G(x1, x2) = U14_G(x2) U15_G(x1, x2) = U15_G(x1, x2) U16_G(x1, x2) = U16_G(x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (46) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 45 less nodes. ---------------------------------------- (47) Complex Obligation (AND) ---------------------------------------- (48) Obligation: Pi DP problem: The TRS P consists of the following rules: ISLESS_IN_GG(succ(X), succ(Y)) -> ISLESS_IN_GG(X, Y) ISLESS_IN_GG(pred(X), pred(Y)) -> ISLESS_IN_GG(X, Y) The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, =_in_ag(X, N)) =_in_ag(X, X) -> =_out_ag(X, X) U1_g(N, =_out_ag(X, N)) -> U2_g(N, X, =_in_ag(X2, succ(zero))) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U3_g(N, isGreater_in_gg(X, X2)) 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)) -> U55_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)) -> U56_gg(X, Y, isGreater_in_gg(X, Y)) U56_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U55_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U3_g(N, isGreater_out_gg(X, X2)) -> U4_g(N, =_in_ag(X3, N)) U4_g(N, =_out_ag(X3, N)) -> U5_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_g(N, =_in_gg(X3, X4)) =_in_gg(X, X) -> =_out_gg(X, X) U6_g(N, =_out_gg(X3, X4)) -> U7_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U17_ga(N, Ret, =_in_ag(X, N)) U17_ga(N, Ret, =_out_ag(X, N)) -> U18_ga(N, Ret, X, =_in_ag(X1, succ(zero))) U18_ga(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_ga(N, Ret, =_in_gg(X, X1)) U19_ga(N, Ret, =_out_gg(X, X1)) -> U20_ga(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) user_defined_is_in_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) -> user_defined_is_out_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) U20_ga(N, Ret, user_defined_is_out_ag(Ret, succ(zero))) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U21_ga(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) U21_ga(N, Ret, hanoi_out_ga(-(N, succ(zero)), Ret1)) -> hanoi_out_ga(N, Ret) U7_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_g(N, isLess_in_gg(X3, X4)) isLess_in_gg(pred(X), zero) -> isLess_out_gg(pred(X), zero) isLess_in_gg(pred(X), succ(Y)) -> isLess_out_gg(pred(X), succ(Y)) isLess_in_gg(pred(X), pred(Y)) -> U57_gg(X, Y, isLess_in_gg(X, Y)) isLess_in_gg(zero, succ(Y)) -> isLess_out_gg(zero, succ(Y)) isLess_in_gg(succ(X), succ(Y)) -> U58_gg(X, Y, isLess_in_gg(X, Y)) U58_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(succ(X), succ(Y)) U57_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(pred(X), pred(Y)) U8_g(N, isLess_out_gg(X3, X4)) -> U9_g(N, hanoi_in_ga(N, X1)) U9_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U10_g(N, =_in_gg(X, X2)) U10_g(N, =_out_gg(X, X2)) -> U11_g(N, =_in_ag(X3, N)) U11_g(N, =_out_ag(X3, N)) -> U12_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_g(N, =_in_gg(X3, X4)) U13_g(N, =_out_gg(X3, X4)) -> U14_g(N, hanoi_in_ga(N, X1)) U14_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_g(N, isLess_in_gg(X3, X4)) U15_g(N, isLess_out_gg(X3, X4)) -> U16_g(N, hanoi_in_ga(N, X1)) U16_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U2_g(x1, x2, x3) = U2_g(x1, x2, x3) succ(x1) = succ(x1) zero = zero U3_g(x1, x2) = U3_g(x1, x2) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U55_gg(x1, x2, x3) = U55_gg(x3) U56_gg(x1, x2, x3) = U56_gg(x3) U4_g(x1, x2) = U4_g(x1, x2) U5_g(x1, x2, x3) = U5_g(x1, x2, x3) U6_g(x1, x2) = U6_g(x1, x2) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg U7_g(x1, x2) = U7_g(x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U17_ga(x1, x2, x3) = U17_ga(x3) U18_ga(x1, x2, x3, x4) = U18_ga(x3, x4) U19_ga(x1, x2, x3) = U19_ga(x3) U20_ga(x1, x2, x3) = U20_ga(x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag hanoi_out_ga(x1, x2) = hanoi_out_ga U21_ga(x1, x2, x3) = U21_ga(x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g U8_g(x1, x2) = U8_g(x1, x2) isLess_in_gg(x1, x2) = isLess_in_gg(x1, x2) isLess_out_gg(x1, x2) = isLess_out_gg U57_gg(x1, x2, x3) = U57_gg(x3) U58_gg(x1, x2, x3) = U58_gg(x3) U9_g(x1, x2) = U9_g(x2) U10_g(x1, x2) = U10_g(x1, x2) U11_g(x1, x2) = U11_g(x1, x2) U12_g(x1, x2, x3) = U12_g(x1, x2, x3) U13_g(x1, x2) = U13_g(x1, x2) U14_g(x1, x2) = U14_g(x2) U15_g(x1, x2) = U15_g(x1, x2) U16_g(x1, x2) = U16_g(x2) ISLESS_IN_GG(x1, x2) = ISLESS_IN_GG(x1, x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (49) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (50) Obligation: Pi DP problem: The TRS P consists of the following rules: ISLESS_IN_GG(succ(X), succ(Y)) -> ISLESS_IN_GG(X, Y) ISLESS_IN_GG(pred(X), pred(Y)) -> ISLESS_IN_GG(X, Y) R is empty. Pi is empty. We have to consider all (P,R,Pi)-chains ---------------------------------------- (51) PiDPToQDPProof (EQUIVALENT) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (52) Obligation: Q DP problem: The TRS P consists of the following rules: ISLESS_IN_GG(succ(X), succ(Y)) -> ISLESS_IN_GG(X, Y) ISLESS_IN_GG(pred(X), pred(Y)) -> ISLESS_IN_GG(X, Y) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (53) 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: *ISLESS_IN_GG(succ(X), succ(Y)) -> ISLESS_IN_GG(X, Y) The graph contains the following edges 1 > 1, 2 > 2 *ISLESS_IN_GG(pred(X), pred(Y)) -> ISLESS_IN_GG(X, Y) The graph contains the following edges 1 > 1, 2 > 2 ---------------------------------------- (54) YES ---------------------------------------- (55) Obligation: Pi DP problem: The TRS P consists of the following rules: HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, succ(zero)), Ret1) The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, =_in_ag(X, N)) =_in_ag(X, X) -> =_out_ag(X, X) U1_g(N, =_out_ag(X, N)) -> U2_g(N, X, =_in_ag(X2, succ(zero))) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U3_g(N, isGreater_in_gg(X, X2)) 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)) -> U55_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)) -> U56_gg(X, Y, isGreater_in_gg(X, Y)) U56_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U55_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U3_g(N, isGreater_out_gg(X, X2)) -> U4_g(N, =_in_ag(X3, N)) U4_g(N, =_out_ag(X3, N)) -> U5_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_g(N, =_in_gg(X3, X4)) =_in_gg(X, X) -> =_out_gg(X, X) U6_g(N, =_out_gg(X3, X4)) -> U7_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U17_ga(N, Ret, =_in_ag(X, N)) U17_ga(N, Ret, =_out_ag(X, N)) -> U18_ga(N, Ret, X, =_in_ag(X1, succ(zero))) U18_ga(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_ga(N, Ret, =_in_gg(X, X1)) U19_ga(N, Ret, =_out_gg(X, X1)) -> U20_ga(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) user_defined_is_in_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) -> user_defined_is_out_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) U20_ga(N, Ret, user_defined_is_out_ag(Ret, succ(zero))) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U21_ga(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) U21_ga(N, Ret, hanoi_out_ga(-(N, succ(zero)), Ret1)) -> hanoi_out_ga(N, Ret) U7_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_g(N, isLess_in_gg(X3, X4)) isLess_in_gg(pred(X), zero) -> isLess_out_gg(pred(X), zero) isLess_in_gg(pred(X), succ(Y)) -> isLess_out_gg(pred(X), succ(Y)) isLess_in_gg(pred(X), pred(Y)) -> U57_gg(X, Y, isLess_in_gg(X, Y)) isLess_in_gg(zero, succ(Y)) -> isLess_out_gg(zero, succ(Y)) isLess_in_gg(succ(X), succ(Y)) -> U58_gg(X, Y, isLess_in_gg(X, Y)) U58_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(succ(X), succ(Y)) U57_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(pred(X), pred(Y)) U8_g(N, isLess_out_gg(X3, X4)) -> U9_g(N, hanoi_in_ga(N, X1)) U9_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U10_g(N, =_in_gg(X, X2)) U10_g(N, =_out_gg(X, X2)) -> U11_g(N, =_in_ag(X3, N)) U11_g(N, =_out_ag(X3, N)) -> U12_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_g(N, =_in_gg(X3, X4)) U13_g(N, =_out_gg(X3, X4)) -> U14_g(N, hanoi_in_ga(N, X1)) U14_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_g(N, isLess_in_gg(X3, X4)) U15_g(N, isLess_out_gg(X3, X4)) -> U16_g(N, hanoi_in_ga(N, X1)) U16_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U2_g(x1, x2, x3) = U2_g(x1, x2, x3) succ(x1) = succ(x1) zero = zero U3_g(x1, x2) = U3_g(x1, x2) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U55_gg(x1, x2, x3) = U55_gg(x3) U56_gg(x1, x2, x3) = U56_gg(x3) U4_g(x1, x2) = U4_g(x1, x2) U5_g(x1, x2, x3) = U5_g(x1, x2, x3) U6_g(x1, x2) = U6_g(x1, x2) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg U7_g(x1, x2) = U7_g(x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U17_ga(x1, x2, x3) = U17_ga(x3) U18_ga(x1, x2, x3, x4) = U18_ga(x3, x4) U19_ga(x1, x2, x3) = U19_ga(x3) U20_ga(x1, x2, x3) = U20_ga(x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag hanoi_out_ga(x1, x2) = hanoi_out_ga U21_ga(x1, x2, x3) = U21_ga(x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g U8_g(x1, x2) = U8_g(x1, x2) isLess_in_gg(x1, x2) = isLess_in_gg(x1, x2) isLess_out_gg(x1, x2) = isLess_out_gg U57_gg(x1, x2, x3) = U57_gg(x3) U58_gg(x1, x2, x3) = U58_gg(x3) U9_g(x1, x2) = U9_g(x2) U10_g(x1, x2) = U10_g(x1, x2) U11_g(x1, x2) = U11_g(x1, x2) U12_g(x1, x2, x3) = U12_g(x1, x2, x3) U13_g(x1, x2) = U13_g(x1, x2) U14_g(x1, x2) = U14_g(x2) U15_g(x1, x2) = U15_g(x1, x2) U16_g(x1, x2) = U16_g(x2) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) We have to consider all (P,R,Pi)-chains ---------------------------------------- (56) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (57) Obligation: Pi DP problem: The TRS P consists of the following rules: HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, succ(zero)), Ret1) R is empty. The argument filtering Pi contains the following mapping: succ(x1) = succ(x1) zero = zero -(x1, x2) = -(x1, x2) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) We have to consider all (P,R,Pi)-chains ---------------------------------------- (58) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (59) Obligation: Q DP problem: The TRS P consists of the following rules: HANOI_IN_GA(N) -> HANOI_IN_GA(-(N, succ(zero))) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (60) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule HANOI_IN_GA(N) -> HANOI_IN_GA(-(N, succ(zero))) we obtained the following new rules [LPAR04]: (HANOI_IN_GA(-(z0, succ(zero))) -> HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))),HANOI_IN_GA(-(z0, succ(zero))) -> HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero)))) ---------------------------------------- (61) Obligation: Q DP problem: The TRS P consists of the following rules: HANOI_IN_GA(-(z0, succ(zero))) -> HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (62) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule HANOI_IN_GA(-(z0, succ(zero))) -> HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))) we obtained the following new rules [LPAR04]: (HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))) -> HANOI_IN_GA(-(-(-(z0, succ(zero)), succ(zero)), succ(zero))),HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))) -> HANOI_IN_GA(-(-(-(z0, succ(zero)), succ(zero)), succ(zero)))) ---------------------------------------- (63) Obligation: Q DP problem: The TRS P consists of the following rules: HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))) -> HANOI_IN_GA(-(-(-(z0, succ(zero)), succ(zero)), succ(zero))) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (64) NonTerminationLoopProof (COMPLETE) We used the non-termination processor [FROCOS05] to show that the DP problem is infinite. Found a loop by semiunifying a rule from P directly. s = HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))) evaluates to t =HANOI_IN_GA(-(-(-(z0, succ(zero)), succ(zero)), succ(zero))) Thus s starts an infinite chain as s semiunifies with t with the following substitutions: * Matcher: [z0 / -(z0, succ(zero))] * Semiunifier: [ ] -------------------------------------------------------------------------------- Rewriting sequence The DP semiunifies directly so there is only one rewrite step from HANOI_IN_GA(-(-(z0, succ(zero)), succ(zero))) to HANOI_IN_GA(-(-(-(z0, succ(zero)), succ(zero)), succ(zero))). ---------------------------------------- (65) NO ---------------------------------------- (66) 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: main_in_g(N) -> U1_g(N, =_in_ag(X, N)) =_in_ag(X, X) -> =_out_ag(X, X) U1_g(N, =_out_ag(X, N)) -> U2_g(N, X, =_in_ag(X2, succ(zero))) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U3_g(N, isGreater_in_gg(X, X2)) 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)) -> U55_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)) -> U56_gg(X, Y, isGreater_in_gg(X, Y)) U56_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(pred(X), pred(Y)) U55_gg(X, Y, isGreater_out_gg(X, Y)) -> isGreater_out_gg(succ(X), succ(Y)) U3_g(N, isGreater_out_gg(X, X2)) -> U4_g(N, =_in_ag(X3, N)) U4_g(N, =_out_ag(X3, N)) -> U5_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U6_g(N, =_in_gg(X3, X4)) =_in_gg(X, X) -> =_out_gg(X, X) U6_g(N, =_out_gg(X3, X4)) -> U7_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U17_ga(N, Ret, =_in_ag(X, N)) U17_ga(N, Ret, =_out_ag(X, N)) -> U18_ga(N, Ret, X, =_in_ag(X1, succ(zero))) U18_ga(N, Ret, X, =_out_ag(X1, succ(zero))) -> U19_ga(N, Ret, =_in_gg(X, X1)) U19_ga(N, Ret, =_out_gg(X, X1)) -> U20_ga(N, Ret, user_defined_is_in_ag(Ret, succ(zero))) user_defined_is_in_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) -> user_defined_is_out_ag(Ret, +(*(Ret1, succ(succ(zero))), succ(zero))) U20_ga(N, Ret, user_defined_is_out_ag(Ret, succ(zero))) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U21_ga(N, Ret, hanoi_in_ga(-(N, succ(zero)), Ret1)) U21_ga(N, Ret, hanoi_out_ga(-(N, succ(zero)), Ret1)) -> hanoi_out_ga(N, Ret) U7_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U5_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U8_g(N, isLess_in_gg(X3, X4)) isLess_in_gg(pred(X), zero) -> isLess_out_gg(pred(X), zero) isLess_in_gg(pred(X), succ(Y)) -> isLess_out_gg(pred(X), succ(Y)) isLess_in_gg(pred(X), pred(Y)) -> U57_gg(X, Y, isLess_in_gg(X, Y)) isLess_in_gg(zero, succ(Y)) -> isLess_out_gg(zero, succ(Y)) isLess_in_gg(succ(X), succ(Y)) -> U58_gg(X, Y, isLess_in_gg(X, Y)) U58_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(succ(X), succ(Y)) U57_gg(X, Y, isLess_out_gg(X, Y)) -> isLess_out_gg(pred(X), pred(Y)) U8_g(N, isLess_out_gg(X3, X4)) -> U9_g(N, hanoi_in_ga(N, X1)) U9_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U2_g(N, X, =_out_ag(X2, succ(zero))) -> U10_g(N, =_in_gg(X, X2)) U10_g(N, =_out_gg(X, X2)) -> U11_g(N, =_in_ag(X3, N)) U11_g(N, =_out_ag(X3, N)) -> U12_g(N, X3, =_in_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U13_g(N, =_in_gg(X3, X4)) U13_g(N, =_out_gg(X3, X4)) -> U14_g(N, hanoi_in_ga(N, X1)) U14_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) U12_g(N, X3, =_out_ag(X4, succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(succ(zero))))))))))))))))))))))))))))))))) -> U15_g(N, isLess_in_gg(X3, X4)) U15_g(N, isLess_out_gg(X3, X4)) -> U16_g(N, hanoi_in_ga(N, X1)) U16_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) =_in_ag(x1, x2) = =_in_ag(x2) =_out_ag(x1, x2) = =_out_ag(x1) U2_g(x1, x2, x3) = U2_g(x1, x2, x3) succ(x1) = succ(x1) zero = zero U3_g(x1, x2) = U3_g(x1, x2) isGreater_in_gg(x1, x2) = isGreater_in_gg(x1, x2) isGreater_out_gg(x1, x2) = isGreater_out_gg pred(x1) = pred(x1) U55_gg(x1, x2, x3) = U55_gg(x3) U56_gg(x1, x2, x3) = U56_gg(x3) U4_g(x1, x2) = U4_g(x1, x2) U5_g(x1, x2, x3) = U5_g(x1, x2, x3) U6_g(x1, x2) = U6_g(x1, x2) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg U7_g(x1, x2) = U7_g(x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U17_ga(x1, x2, x3) = U17_ga(x3) U18_ga(x1, x2, x3, x4) = U18_ga(x3, x4) U19_ga(x1, x2, x3) = U19_ga(x3) U20_ga(x1, x2, x3) = U20_ga(x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag hanoi_out_ga(x1, x2) = hanoi_out_ga U21_ga(x1, x2, x3) = U21_ga(x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g U8_g(x1, x2) = U8_g(x1, x2) isLess_in_gg(x1, x2) = isLess_in_gg(x1, x2) isLess_out_gg(x1, x2) = isLess_out_gg U57_gg(x1, x2, x3) = U57_gg(x3) U58_gg(x1, x2, x3) = U58_gg(x3) U9_g(x1, x2) = U9_g(x2) U10_g(x1, x2) = U10_g(x1, x2) U11_g(x1, x2) = U11_g(x1, x2) U12_g(x1, x2, x3) = U12_g(x1, x2, x3) U13_g(x1, x2) = U13_g(x1, x2) U14_g(x1, x2) = U14_g(x2) U15_g(x1, x2) = U15_g(x1, x2) U16_g(x1, x2) = U16_g(x2) ISGREATER_IN_GG(x1, x2) = ISGREATER_IN_GG(x1, x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (67) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (68) 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 ---------------------------------------- (69) PiDPToQDPProof (EQUIVALENT) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (70) 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. ---------------------------------------- (71) 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 ---------------------------------------- (72) YES ---------------------------------------- (73) CutEliminatorProof (SOUND) Eliminated all cuts by simply ignoring them[PROLOG]. ---------------------------------------- (74) Obligation: Clauses: main(N) :- ','(>=(N, 1), ','(=<(N, 31), hanoi(N, X1))). hanoi(N, Ret) :- ','(=:=(N, 1), user_defined_is(Ret, 1)). hanoi(N, Ret) :- hanoi(-(N, 1), Ret1). user_defined_is(Ret, +(*(Ret1, 2), 1)). Query: main(g) ---------------------------------------- (75) UndefinedPredicateHandlerProof (SOUND) Added facts for all undefined predicates [PROLOG]. ---------------------------------------- (76) Obligation: Clauses: main(N) :- ','(>=(N, 1), ','(=<(N, 31), hanoi(N, X1))). hanoi(N, Ret) :- ','(=:=(N, 1), user_defined_is(Ret, 1)). hanoi(N, Ret) :- hanoi(-(N, 1), Ret1). user_defined_is(Ret, +(*(Ret1, 2), 1)). >=(X0, X1). =<(X0, X1). =:=(X0, X1). Query: main(g) ---------------------------------------- (77) PrologToPiTRSProof (SOUND) We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: main_in_1: (b) hanoi_in_2: (b,f) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, >=_in_gg(N, 1)) >=_in_gg(X0, X1) -> >=_out_gg(X0, X1) U1_g(N, >=_out_gg(N, 1)) -> U2_g(N, =<_in_gg(N, 31)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U2_g(N, =<_out_gg(N, 31)) -> U3_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U4_ga(N, Ret, =:=_in_gg(N, 1)) =:=_in_gg(X0, X1) -> =:=_out_gg(X0, X1) U4_ga(N, Ret, =:=_out_gg(N, 1)) -> U5_ga(N, Ret, user_defined_is_in_ag(Ret, 1)) user_defined_is_in_ag(Ret, +(*(Ret1, 2), 1)) -> user_defined_is_out_ag(Ret, +(*(Ret1, 2), 1)) U5_ga(N, Ret, user_defined_is_out_ag(Ret, 1)) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U6_ga(N, Ret, hanoi_in_ga(-(N, 1), Ret1)) U6_ga(N, Ret, hanoi_out_ga(-(N, 1), Ret1)) -> hanoi_out_ga(N, Ret) U3_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) >=_in_gg(x1, x2) = >=_in_gg(x1, x2) >=_out_gg(x1, x2) = >=_out_gg 1 = 1 U2_g(x1, x2) = U2_g(x1, x2) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg 31 = 31 U3_g(x1, x2) = U3_g(x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U4_ga(x1, x2, x3) = U4_ga(x3) =:=_in_gg(x1, x2) = =:=_in_gg(x1, x2) =:=_out_gg(x1, x2) = =:=_out_gg U5_ga(x1, x2, x3) = U5_ga(x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) 2 = 2 user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag hanoi_out_ga(x1, x2) = hanoi_out_ga U6_ga(x1, x2, x3) = U6_ga(x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog ---------------------------------------- (78) Obligation: Pi-finite rewrite system: The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, >=_in_gg(N, 1)) >=_in_gg(X0, X1) -> >=_out_gg(X0, X1) U1_g(N, >=_out_gg(N, 1)) -> U2_g(N, =<_in_gg(N, 31)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U2_g(N, =<_out_gg(N, 31)) -> U3_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U4_ga(N, Ret, =:=_in_gg(N, 1)) =:=_in_gg(X0, X1) -> =:=_out_gg(X0, X1) U4_ga(N, Ret, =:=_out_gg(N, 1)) -> U5_ga(N, Ret, user_defined_is_in_ag(Ret, 1)) user_defined_is_in_ag(Ret, +(*(Ret1, 2), 1)) -> user_defined_is_out_ag(Ret, +(*(Ret1, 2), 1)) U5_ga(N, Ret, user_defined_is_out_ag(Ret, 1)) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U6_ga(N, Ret, hanoi_in_ga(-(N, 1), Ret1)) U6_ga(N, Ret, hanoi_out_ga(-(N, 1), Ret1)) -> hanoi_out_ga(N, Ret) U3_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) >=_in_gg(x1, x2) = >=_in_gg(x1, x2) >=_out_gg(x1, x2) = >=_out_gg 1 = 1 U2_g(x1, x2) = U2_g(x1, x2) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg 31 = 31 U3_g(x1, x2) = U3_g(x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U4_ga(x1, x2, x3) = U4_ga(x3) =:=_in_gg(x1, x2) = =:=_in_gg(x1, x2) =:=_out_gg(x1, x2) = =:=_out_gg U5_ga(x1, x2, x3) = U5_ga(x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) 2 = 2 user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag hanoi_out_ga(x1, x2) = hanoi_out_ga U6_ga(x1, x2, x3) = U6_ga(x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g ---------------------------------------- (79) 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: MAIN_IN_G(N) -> U1_G(N, >=_in_gg(N, 1)) MAIN_IN_G(N) -> >=_IN_GG(N, 1) U1_G(N, >=_out_gg(N, 1)) -> U2_G(N, =<_in_gg(N, 31)) U1_G(N, >=_out_gg(N, 1)) -> =<_IN_GG(N, 31) U2_G(N, =<_out_gg(N, 31)) -> U3_G(N, hanoi_in_ga(N, X1)) U2_G(N, =<_out_gg(N, 31)) -> HANOI_IN_GA(N, X1) HANOI_IN_GA(N, Ret) -> U4_GA(N, Ret, =:=_in_gg(N, 1)) HANOI_IN_GA(N, Ret) -> =:=_IN_GG(N, 1) U4_GA(N, Ret, =:=_out_gg(N, 1)) -> U5_GA(N, Ret, user_defined_is_in_ag(Ret, 1)) U4_GA(N, Ret, =:=_out_gg(N, 1)) -> USER_DEFINED_IS_IN_AG(Ret, 1) HANOI_IN_GA(N, Ret) -> U6_GA(N, Ret, hanoi_in_ga(-(N, 1), Ret1)) HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, 1), Ret1) The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, >=_in_gg(N, 1)) >=_in_gg(X0, X1) -> >=_out_gg(X0, X1) U1_g(N, >=_out_gg(N, 1)) -> U2_g(N, =<_in_gg(N, 31)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U2_g(N, =<_out_gg(N, 31)) -> U3_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U4_ga(N, Ret, =:=_in_gg(N, 1)) =:=_in_gg(X0, X1) -> =:=_out_gg(X0, X1) U4_ga(N, Ret, =:=_out_gg(N, 1)) -> U5_ga(N, Ret, user_defined_is_in_ag(Ret, 1)) user_defined_is_in_ag(Ret, +(*(Ret1, 2), 1)) -> user_defined_is_out_ag(Ret, +(*(Ret1, 2), 1)) U5_ga(N, Ret, user_defined_is_out_ag(Ret, 1)) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U6_ga(N, Ret, hanoi_in_ga(-(N, 1), Ret1)) U6_ga(N, Ret, hanoi_out_ga(-(N, 1), Ret1)) -> hanoi_out_ga(N, Ret) U3_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) >=_in_gg(x1, x2) = >=_in_gg(x1, x2) >=_out_gg(x1, x2) = >=_out_gg 1 = 1 U2_g(x1, x2) = U2_g(x1, x2) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg 31 = 31 U3_g(x1, x2) = U3_g(x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U4_ga(x1, x2, x3) = U4_ga(x3) =:=_in_gg(x1, x2) = =:=_in_gg(x1, x2) =:=_out_gg(x1, x2) = =:=_out_gg U5_ga(x1, x2, x3) = U5_ga(x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) 2 = 2 user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag hanoi_out_ga(x1, x2) = hanoi_out_ga U6_ga(x1, x2, x3) = U6_ga(x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g MAIN_IN_G(x1) = MAIN_IN_G(x1) U1_G(x1, x2) = U1_G(x1, x2) >=_IN_GG(x1, x2) = >=_IN_GG(x1, x2) U2_G(x1, x2) = U2_G(x1, x2) =<_IN_GG(x1, x2) = =<_IN_GG(x1, x2) U3_G(x1, x2) = U3_G(x2) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) U4_GA(x1, x2, x3) = U4_GA(x3) =:=_IN_GG(x1, x2) = =:=_IN_GG(x1, x2) U5_GA(x1, x2, x3) = U5_GA(x3) USER_DEFINED_IS_IN_AG(x1, x2) = USER_DEFINED_IS_IN_AG(x2) U6_GA(x1, x2, x3) = U6_GA(x3) We have to consider all (P,R,Pi)-chains ---------------------------------------- (80) Obligation: Pi DP problem: The TRS P consists of the following rules: MAIN_IN_G(N) -> U1_G(N, >=_in_gg(N, 1)) MAIN_IN_G(N) -> >=_IN_GG(N, 1) U1_G(N, >=_out_gg(N, 1)) -> U2_G(N, =<_in_gg(N, 31)) U1_G(N, >=_out_gg(N, 1)) -> =<_IN_GG(N, 31) U2_G(N, =<_out_gg(N, 31)) -> U3_G(N, hanoi_in_ga(N, X1)) U2_G(N, =<_out_gg(N, 31)) -> HANOI_IN_GA(N, X1) HANOI_IN_GA(N, Ret) -> U4_GA(N, Ret, =:=_in_gg(N, 1)) HANOI_IN_GA(N, Ret) -> =:=_IN_GG(N, 1) U4_GA(N, Ret, =:=_out_gg(N, 1)) -> U5_GA(N, Ret, user_defined_is_in_ag(Ret, 1)) U4_GA(N, Ret, =:=_out_gg(N, 1)) -> USER_DEFINED_IS_IN_AG(Ret, 1) HANOI_IN_GA(N, Ret) -> U6_GA(N, Ret, hanoi_in_ga(-(N, 1), Ret1)) HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, 1), Ret1) The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, >=_in_gg(N, 1)) >=_in_gg(X0, X1) -> >=_out_gg(X0, X1) U1_g(N, >=_out_gg(N, 1)) -> U2_g(N, =<_in_gg(N, 31)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U2_g(N, =<_out_gg(N, 31)) -> U3_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U4_ga(N, Ret, =:=_in_gg(N, 1)) =:=_in_gg(X0, X1) -> =:=_out_gg(X0, X1) U4_ga(N, Ret, =:=_out_gg(N, 1)) -> U5_ga(N, Ret, user_defined_is_in_ag(Ret, 1)) user_defined_is_in_ag(Ret, +(*(Ret1, 2), 1)) -> user_defined_is_out_ag(Ret, +(*(Ret1, 2), 1)) U5_ga(N, Ret, user_defined_is_out_ag(Ret, 1)) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U6_ga(N, Ret, hanoi_in_ga(-(N, 1), Ret1)) U6_ga(N, Ret, hanoi_out_ga(-(N, 1), Ret1)) -> hanoi_out_ga(N, Ret) U3_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) >=_in_gg(x1, x2) = >=_in_gg(x1, x2) >=_out_gg(x1, x2) = >=_out_gg 1 = 1 U2_g(x1, x2) = U2_g(x1, x2) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg 31 = 31 U3_g(x1, x2) = U3_g(x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U4_ga(x1, x2, x3) = U4_ga(x3) =:=_in_gg(x1, x2) = =:=_in_gg(x1, x2) =:=_out_gg(x1, x2) = =:=_out_gg U5_ga(x1, x2, x3) = U5_ga(x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) 2 = 2 user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag hanoi_out_ga(x1, x2) = hanoi_out_ga U6_ga(x1, x2, x3) = U6_ga(x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g MAIN_IN_G(x1) = MAIN_IN_G(x1) U1_G(x1, x2) = U1_G(x1, x2) >=_IN_GG(x1, x2) = >=_IN_GG(x1, x2) U2_G(x1, x2) = U2_G(x1, x2) =<_IN_GG(x1, x2) = =<_IN_GG(x1, x2) U3_G(x1, x2) = U3_G(x2) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) U4_GA(x1, x2, x3) = U4_GA(x3) =:=_IN_GG(x1, x2) = =:=_IN_GG(x1, x2) U5_GA(x1, x2, x3) = U5_GA(x3) USER_DEFINED_IS_IN_AG(x1, x2) = USER_DEFINED_IS_IN_AG(x2) U6_GA(x1, x2, x3) = U6_GA(x3) We have to consider all (P,R,Pi)-chains ---------------------------------------- (81) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 11 less nodes. ---------------------------------------- (82) Obligation: Pi DP problem: The TRS P consists of the following rules: HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, 1), Ret1) The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, >=_in_gg(N, 1)) >=_in_gg(X0, X1) -> >=_out_gg(X0, X1) U1_g(N, >=_out_gg(N, 1)) -> U2_g(N, =<_in_gg(N, 31)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U2_g(N, =<_out_gg(N, 31)) -> U3_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U4_ga(N, Ret, =:=_in_gg(N, 1)) =:=_in_gg(X0, X1) -> =:=_out_gg(X0, X1) U4_ga(N, Ret, =:=_out_gg(N, 1)) -> U5_ga(N, Ret, user_defined_is_in_ag(Ret, 1)) user_defined_is_in_ag(Ret, +(*(Ret1, 2), 1)) -> user_defined_is_out_ag(Ret, +(*(Ret1, 2), 1)) U5_ga(N, Ret, user_defined_is_out_ag(Ret, 1)) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U6_ga(N, Ret, hanoi_in_ga(-(N, 1), Ret1)) U6_ga(N, Ret, hanoi_out_ga(-(N, 1), Ret1)) -> hanoi_out_ga(N, Ret) U3_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) >=_in_gg(x1, x2) = >=_in_gg(x1, x2) >=_out_gg(x1, x2) = >=_out_gg 1 = 1 U2_g(x1, x2) = U2_g(x1, x2) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg 31 = 31 U3_g(x1, x2) = U3_g(x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U4_ga(x1, x2, x3) = U4_ga(x3) =:=_in_gg(x1, x2) = =:=_in_gg(x1, x2) =:=_out_gg(x1, x2) = =:=_out_gg U5_ga(x1, x2, x3) = U5_ga(x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) 2 = 2 user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag hanoi_out_ga(x1, x2) = hanoi_out_ga U6_ga(x1, x2, x3) = U6_ga(x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) We have to consider all (P,R,Pi)-chains ---------------------------------------- (83) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (84) Obligation: Pi DP problem: The TRS P consists of the following rules: HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, 1), Ret1) R is empty. The argument filtering Pi contains the following mapping: 1 = 1 -(x1, x2) = -(x1, x2) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) We have to consider all (P,R,Pi)-chains ---------------------------------------- (85) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (86) Obligation: Q DP problem: The TRS P consists of the following rules: HANOI_IN_GA(N) -> HANOI_IN_GA(-(N, 1)) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (87) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule HANOI_IN_GA(N) -> HANOI_IN_GA(-(N, 1)) we obtained the following new rules [LPAR04]: (HANOI_IN_GA(-(z0, 1)) -> HANOI_IN_GA(-(-(z0, 1), 1)),HANOI_IN_GA(-(z0, 1)) -> HANOI_IN_GA(-(-(z0, 1), 1))) ---------------------------------------- (88) Obligation: Q DP problem: The TRS P consists of the following rules: HANOI_IN_GA(-(z0, 1)) -> HANOI_IN_GA(-(-(z0, 1), 1)) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (89) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule HANOI_IN_GA(-(z0, 1)) -> HANOI_IN_GA(-(-(z0, 1), 1)) we obtained the following new rules [LPAR04]: (HANOI_IN_GA(-(-(z0, 1), 1)) -> HANOI_IN_GA(-(-(-(z0, 1), 1), 1)),HANOI_IN_GA(-(-(z0, 1), 1)) -> HANOI_IN_GA(-(-(-(z0, 1), 1), 1))) ---------------------------------------- (90) Obligation: Q DP problem: The TRS P consists of the following rules: HANOI_IN_GA(-(-(z0, 1), 1)) -> HANOI_IN_GA(-(-(-(z0, 1), 1), 1)) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (91) NonTerminationLoopProof (COMPLETE) We used the non-termination processor [FROCOS05] to show that the DP problem is infinite. Found a loop by semiunifying a rule from P directly. s = HANOI_IN_GA(-(-(z0, 1), 1)) evaluates to t =HANOI_IN_GA(-(-(-(z0, 1), 1), 1)) Thus s starts an infinite chain as s semiunifies with t with the following substitutions: * Matcher: [z0 / -(z0, 1)] * Semiunifier: [ ] -------------------------------------------------------------------------------- Rewriting sequence The DP semiunifies directly so there is only one rewrite step from HANOI_IN_GA(-(-(z0, 1), 1)) to HANOI_IN_GA(-(-(-(z0, 1), 1), 1)). ---------------------------------------- (92) NO ---------------------------------------- (93) PrologToPiTRSProof (SOUND) We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: main_in_1: (b) hanoi_in_2: (b,f) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, >=_in_gg(N, 1)) >=_in_gg(X0, X1) -> >=_out_gg(X0, X1) U1_g(N, >=_out_gg(N, 1)) -> U2_g(N, =<_in_gg(N, 31)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U2_g(N, =<_out_gg(N, 31)) -> U3_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U4_ga(N, Ret, =:=_in_gg(N, 1)) =:=_in_gg(X0, X1) -> =:=_out_gg(X0, X1) U4_ga(N, Ret, =:=_out_gg(N, 1)) -> U5_ga(N, Ret, user_defined_is_in_ag(Ret, 1)) user_defined_is_in_ag(Ret, +(*(Ret1, 2), 1)) -> user_defined_is_out_ag(Ret, +(*(Ret1, 2), 1)) U5_ga(N, Ret, user_defined_is_out_ag(Ret, 1)) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U6_ga(N, Ret, hanoi_in_ga(-(N, 1), Ret1)) U6_ga(N, Ret, hanoi_out_ga(-(N, 1), Ret1)) -> hanoi_out_ga(N, Ret) U3_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) >=_in_gg(x1, x2) = >=_in_gg(x1, x2) >=_out_gg(x1, x2) = >=_out_gg(x1, x2) 1 = 1 U2_g(x1, x2) = U2_g(x1, x2) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg(x1, x2) 31 = 31 U3_g(x1, x2) = U3_g(x1, x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U4_ga(x1, x2, x3) = U4_ga(x1, x3) =:=_in_gg(x1, x2) = =:=_in_gg(x1, x2) =:=_out_gg(x1, x2) = =:=_out_gg(x1, x2) U5_ga(x1, x2, x3) = U5_ga(x1, x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) 2 = 2 user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag(x2) hanoi_out_ga(x1, x2) = hanoi_out_ga(x1) U6_ga(x1, x2, x3) = U6_ga(x1, x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g(x1) Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog ---------------------------------------- (94) Obligation: Pi-finite rewrite system: The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, >=_in_gg(N, 1)) >=_in_gg(X0, X1) -> >=_out_gg(X0, X1) U1_g(N, >=_out_gg(N, 1)) -> U2_g(N, =<_in_gg(N, 31)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U2_g(N, =<_out_gg(N, 31)) -> U3_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U4_ga(N, Ret, =:=_in_gg(N, 1)) =:=_in_gg(X0, X1) -> =:=_out_gg(X0, X1) U4_ga(N, Ret, =:=_out_gg(N, 1)) -> U5_ga(N, Ret, user_defined_is_in_ag(Ret, 1)) user_defined_is_in_ag(Ret, +(*(Ret1, 2), 1)) -> user_defined_is_out_ag(Ret, +(*(Ret1, 2), 1)) U5_ga(N, Ret, user_defined_is_out_ag(Ret, 1)) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U6_ga(N, Ret, hanoi_in_ga(-(N, 1), Ret1)) U6_ga(N, Ret, hanoi_out_ga(-(N, 1), Ret1)) -> hanoi_out_ga(N, Ret) U3_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) >=_in_gg(x1, x2) = >=_in_gg(x1, x2) >=_out_gg(x1, x2) = >=_out_gg(x1, x2) 1 = 1 U2_g(x1, x2) = U2_g(x1, x2) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg(x1, x2) 31 = 31 U3_g(x1, x2) = U3_g(x1, x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U4_ga(x1, x2, x3) = U4_ga(x1, x3) =:=_in_gg(x1, x2) = =:=_in_gg(x1, x2) =:=_out_gg(x1, x2) = =:=_out_gg(x1, x2) U5_ga(x1, x2, x3) = U5_ga(x1, x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) 2 = 2 user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag(x2) hanoi_out_ga(x1, x2) = hanoi_out_ga(x1) U6_ga(x1, x2, x3) = U6_ga(x1, x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g(x1) ---------------------------------------- (95) 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: MAIN_IN_G(N) -> U1_G(N, >=_in_gg(N, 1)) MAIN_IN_G(N) -> >=_IN_GG(N, 1) U1_G(N, >=_out_gg(N, 1)) -> U2_G(N, =<_in_gg(N, 31)) U1_G(N, >=_out_gg(N, 1)) -> =<_IN_GG(N, 31) U2_G(N, =<_out_gg(N, 31)) -> U3_G(N, hanoi_in_ga(N, X1)) U2_G(N, =<_out_gg(N, 31)) -> HANOI_IN_GA(N, X1) HANOI_IN_GA(N, Ret) -> U4_GA(N, Ret, =:=_in_gg(N, 1)) HANOI_IN_GA(N, Ret) -> =:=_IN_GG(N, 1) U4_GA(N, Ret, =:=_out_gg(N, 1)) -> U5_GA(N, Ret, user_defined_is_in_ag(Ret, 1)) U4_GA(N, Ret, =:=_out_gg(N, 1)) -> USER_DEFINED_IS_IN_AG(Ret, 1) HANOI_IN_GA(N, Ret) -> U6_GA(N, Ret, hanoi_in_ga(-(N, 1), Ret1)) HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, 1), Ret1) The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, >=_in_gg(N, 1)) >=_in_gg(X0, X1) -> >=_out_gg(X0, X1) U1_g(N, >=_out_gg(N, 1)) -> U2_g(N, =<_in_gg(N, 31)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U2_g(N, =<_out_gg(N, 31)) -> U3_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U4_ga(N, Ret, =:=_in_gg(N, 1)) =:=_in_gg(X0, X1) -> =:=_out_gg(X0, X1) U4_ga(N, Ret, =:=_out_gg(N, 1)) -> U5_ga(N, Ret, user_defined_is_in_ag(Ret, 1)) user_defined_is_in_ag(Ret, +(*(Ret1, 2), 1)) -> user_defined_is_out_ag(Ret, +(*(Ret1, 2), 1)) U5_ga(N, Ret, user_defined_is_out_ag(Ret, 1)) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U6_ga(N, Ret, hanoi_in_ga(-(N, 1), Ret1)) U6_ga(N, Ret, hanoi_out_ga(-(N, 1), Ret1)) -> hanoi_out_ga(N, Ret) U3_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) >=_in_gg(x1, x2) = >=_in_gg(x1, x2) >=_out_gg(x1, x2) = >=_out_gg(x1, x2) 1 = 1 U2_g(x1, x2) = U2_g(x1, x2) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg(x1, x2) 31 = 31 U3_g(x1, x2) = U3_g(x1, x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U4_ga(x1, x2, x3) = U4_ga(x1, x3) =:=_in_gg(x1, x2) = =:=_in_gg(x1, x2) =:=_out_gg(x1, x2) = =:=_out_gg(x1, x2) U5_ga(x1, x2, x3) = U5_ga(x1, x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) 2 = 2 user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag(x2) hanoi_out_ga(x1, x2) = hanoi_out_ga(x1) U6_ga(x1, x2, x3) = U6_ga(x1, x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g(x1) MAIN_IN_G(x1) = MAIN_IN_G(x1) U1_G(x1, x2) = U1_G(x1, x2) >=_IN_GG(x1, x2) = >=_IN_GG(x1, x2) U2_G(x1, x2) = U2_G(x1, x2) =<_IN_GG(x1, x2) = =<_IN_GG(x1, x2) U3_G(x1, x2) = U3_G(x1, x2) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) U4_GA(x1, x2, x3) = U4_GA(x1, x3) =:=_IN_GG(x1, x2) = =:=_IN_GG(x1, x2) U5_GA(x1, x2, x3) = U5_GA(x1, x3) USER_DEFINED_IS_IN_AG(x1, x2) = USER_DEFINED_IS_IN_AG(x2) U6_GA(x1, x2, x3) = U6_GA(x1, x3) We have to consider all (P,R,Pi)-chains ---------------------------------------- (96) Obligation: Pi DP problem: The TRS P consists of the following rules: MAIN_IN_G(N) -> U1_G(N, >=_in_gg(N, 1)) MAIN_IN_G(N) -> >=_IN_GG(N, 1) U1_G(N, >=_out_gg(N, 1)) -> U2_G(N, =<_in_gg(N, 31)) U1_G(N, >=_out_gg(N, 1)) -> =<_IN_GG(N, 31) U2_G(N, =<_out_gg(N, 31)) -> U3_G(N, hanoi_in_ga(N, X1)) U2_G(N, =<_out_gg(N, 31)) -> HANOI_IN_GA(N, X1) HANOI_IN_GA(N, Ret) -> U4_GA(N, Ret, =:=_in_gg(N, 1)) HANOI_IN_GA(N, Ret) -> =:=_IN_GG(N, 1) U4_GA(N, Ret, =:=_out_gg(N, 1)) -> U5_GA(N, Ret, user_defined_is_in_ag(Ret, 1)) U4_GA(N, Ret, =:=_out_gg(N, 1)) -> USER_DEFINED_IS_IN_AG(Ret, 1) HANOI_IN_GA(N, Ret) -> U6_GA(N, Ret, hanoi_in_ga(-(N, 1), Ret1)) HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, 1), Ret1) The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, >=_in_gg(N, 1)) >=_in_gg(X0, X1) -> >=_out_gg(X0, X1) U1_g(N, >=_out_gg(N, 1)) -> U2_g(N, =<_in_gg(N, 31)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U2_g(N, =<_out_gg(N, 31)) -> U3_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U4_ga(N, Ret, =:=_in_gg(N, 1)) =:=_in_gg(X0, X1) -> =:=_out_gg(X0, X1) U4_ga(N, Ret, =:=_out_gg(N, 1)) -> U5_ga(N, Ret, user_defined_is_in_ag(Ret, 1)) user_defined_is_in_ag(Ret, +(*(Ret1, 2), 1)) -> user_defined_is_out_ag(Ret, +(*(Ret1, 2), 1)) U5_ga(N, Ret, user_defined_is_out_ag(Ret, 1)) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U6_ga(N, Ret, hanoi_in_ga(-(N, 1), Ret1)) U6_ga(N, Ret, hanoi_out_ga(-(N, 1), Ret1)) -> hanoi_out_ga(N, Ret) U3_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) >=_in_gg(x1, x2) = >=_in_gg(x1, x2) >=_out_gg(x1, x2) = >=_out_gg(x1, x2) 1 = 1 U2_g(x1, x2) = U2_g(x1, x2) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg(x1, x2) 31 = 31 U3_g(x1, x2) = U3_g(x1, x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U4_ga(x1, x2, x3) = U4_ga(x1, x3) =:=_in_gg(x1, x2) = =:=_in_gg(x1, x2) =:=_out_gg(x1, x2) = =:=_out_gg(x1, x2) U5_ga(x1, x2, x3) = U5_ga(x1, x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) 2 = 2 user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag(x2) hanoi_out_ga(x1, x2) = hanoi_out_ga(x1) U6_ga(x1, x2, x3) = U6_ga(x1, x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g(x1) MAIN_IN_G(x1) = MAIN_IN_G(x1) U1_G(x1, x2) = U1_G(x1, x2) >=_IN_GG(x1, x2) = >=_IN_GG(x1, x2) U2_G(x1, x2) = U2_G(x1, x2) =<_IN_GG(x1, x2) = =<_IN_GG(x1, x2) U3_G(x1, x2) = U3_G(x1, x2) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) U4_GA(x1, x2, x3) = U4_GA(x1, x3) =:=_IN_GG(x1, x2) = =:=_IN_GG(x1, x2) U5_GA(x1, x2, x3) = U5_GA(x1, x3) USER_DEFINED_IS_IN_AG(x1, x2) = USER_DEFINED_IS_IN_AG(x2) U6_GA(x1, x2, x3) = U6_GA(x1, x3) We have to consider all (P,R,Pi)-chains ---------------------------------------- (97) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 11 less nodes. ---------------------------------------- (98) Obligation: Pi DP problem: The TRS P consists of the following rules: HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, 1), Ret1) The TRS R consists of the following rules: main_in_g(N) -> U1_g(N, >=_in_gg(N, 1)) >=_in_gg(X0, X1) -> >=_out_gg(X0, X1) U1_g(N, >=_out_gg(N, 1)) -> U2_g(N, =<_in_gg(N, 31)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U2_g(N, =<_out_gg(N, 31)) -> U3_g(N, hanoi_in_ga(N, X1)) hanoi_in_ga(N, Ret) -> U4_ga(N, Ret, =:=_in_gg(N, 1)) =:=_in_gg(X0, X1) -> =:=_out_gg(X0, X1) U4_ga(N, Ret, =:=_out_gg(N, 1)) -> U5_ga(N, Ret, user_defined_is_in_ag(Ret, 1)) user_defined_is_in_ag(Ret, +(*(Ret1, 2), 1)) -> user_defined_is_out_ag(Ret, +(*(Ret1, 2), 1)) U5_ga(N, Ret, user_defined_is_out_ag(Ret, 1)) -> hanoi_out_ga(N, Ret) hanoi_in_ga(N, Ret) -> U6_ga(N, Ret, hanoi_in_ga(-(N, 1), Ret1)) U6_ga(N, Ret, hanoi_out_ga(-(N, 1), Ret1)) -> hanoi_out_ga(N, Ret) U3_g(N, hanoi_out_ga(N, X1)) -> main_out_g(N) The argument filtering Pi contains the following mapping: main_in_g(x1) = main_in_g(x1) U1_g(x1, x2) = U1_g(x1, x2) >=_in_gg(x1, x2) = >=_in_gg(x1, x2) >=_out_gg(x1, x2) = >=_out_gg(x1, x2) 1 = 1 U2_g(x1, x2) = U2_g(x1, x2) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg(x1, x2) 31 = 31 U3_g(x1, x2) = U3_g(x1, x2) hanoi_in_ga(x1, x2) = hanoi_in_ga(x1) U4_ga(x1, x2, x3) = U4_ga(x1, x3) =:=_in_gg(x1, x2) = =:=_in_gg(x1, x2) =:=_out_gg(x1, x2) = =:=_out_gg(x1, x2) U5_ga(x1, x2, x3) = U5_ga(x1, x3) user_defined_is_in_ag(x1, x2) = user_defined_is_in_ag(x2) +(x1, x2) = +(x1, x2) *(x1, x2) = *(x1, x2) 2 = 2 user_defined_is_out_ag(x1, x2) = user_defined_is_out_ag(x2) hanoi_out_ga(x1, x2) = hanoi_out_ga(x1) U6_ga(x1, x2, x3) = U6_ga(x1, x3) -(x1, x2) = -(x1, x2) main_out_g(x1) = main_out_g(x1) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) We have to consider all (P,R,Pi)-chains ---------------------------------------- (99) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (100) Obligation: Pi DP problem: The TRS P consists of the following rules: HANOI_IN_GA(N, Ret) -> HANOI_IN_GA(-(N, 1), Ret1) R is empty. The argument filtering Pi contains the following mapping: 1 = 1 -(x1, x2) = -(x1, x2) HANOI_IN_GA(x1, x2) = HANOI_IN_GA(x1) We have to consider all (P,R,Pi)-chains ---------------------------------------- (101) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (102) Obligation: Q DP problem: The TRS P consists of the following rules: HANOI_IN_GA(N) -> HANOI_IN_GA(-(N, 1)) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (103) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule HANOI_IN_GA(N) -> HANOI_IN_GA(-(N, 1)) we obtained the following new rules [LPAR04]: (HANOI_IN_GA(-(z0, 1)) -> HANOI_IN_GA(-(-(z0, 1), 1)),HANOI_IN_GA(-(z0, 1)) -> HANOI_IN_GA(-(-(z0, 1), 1))) ---------------------------------------- (104) Obligation: Q DP problem: The TRS P consists of the following rules: HANOI_IN_GA(-(z0, 1)) -> HANOI_IN_GA(-(-(z0, 1), 1)) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (105) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule HANOI_IN_GA(-(z0, 1)) -> HANOI_IN_GA(-(-(z0, 1), 1)) we obtained the following new rules [LPAR04]: (HANOI_IN_GA(-(-(z0, 1), 1)) -> HANOI_IN_GA(-(-(-(z0, 1), 1), 1)),HANOI_IN_GA(-(-(z0, 1), 1)) -> HANOI_IN_GA(-(-(-(z0, 1), 1), 1))) ---------------------------------------- (106) Obligation: Q DP problem: The TRS P consists of the following rules: HANOI_IN_GA(-(-(z0, 1), 1)) -> HANOI_IN_GA(-(-(-(z0, 1), 1), 1)) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (107) NonTerminationLoopProof (COMPLETE) We used the non-termination processor [FROCOS05] to show that the DP problem is infinite. Found a loop by semiunifying a rule from P directly. s = HANOI_IN_GA(-(-(z0, 1), 1)) evaluates to t =HANOI_IN_GA(-(-(-(z0, 1), 1), 1)) Thus s starts an infinite chain as s semiunifies with t with the following substitutions: * Matcher: [z0 / -(z0, 1)] * Semiunifier: [ ] -------------------------------------------------------------------------------- Rewriting sequence The DP semiunifies directly so there is only one rewrite step from HANOI_IN_GA(-(-(z0, 1), 1)) to HANOI_IN_GA(-(-(-(z0, 1), 1), 1)). ---------------------------------------- (108) NO ---------------------------------------- (109) PrologToIRSwTTransformerProof (SOUND) Transformed Prolog program to IRSwT according to method in Master Thesis of A. Weinert { "root": 2, "program": { "directives": [], "clauses": [ [ "(main N)", "(',' (>= N (1)) (',' (=< N (31)) (hanoi N X1)))" ], [ "(hanoi N Ret)", "(',' (=:= N (1)) (',' (!) (user_defined_is Ret (1))))" ], [ "(hanoi N Ret)", "(hanoi (- N (1)) Ret1)" ], [ "(user_defined_is Ret (+ (* Ret1 (2)) (1)))", null ] ] }, "graph": { "nodes": { "11": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes", "374": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (=< T4 (31)) (hanoi T4 X6))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "type": "PlainIntegerConstant", "value": "1" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }] }, "ground": ["T4"], "free": ["X6"], "exprvars": ["T4"] } }, "1932": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "1" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "name": "T4", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" }, { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "31" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" } ] }, "ground": [], "free": [], "exprvars": [ "T4", "T8" ] } }, "375": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "type": "PlainIntegerConstant", "value": "1" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": ">" }] }, "ground": ["T4"], "free": ["X6"], "exprvars": ["T4"] } }, "1744": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T4", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": ">" }, { "lhs": { "type": "PlainIntegerConstant", "value": "1" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" } ] }, "ground": ["T4"], "free": ["X6"], "exprvars": ["T4"] } }, "1931": { "goal": [{ "clause": 3, "scope": 3, "term": "(user_defined_is X18 (1))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "1" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "name": "T4", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" }, { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "31" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" } ] }, "ground": [], "free": ["X18"], "exprvars": [ "T4", "T8" ] } }, "2": { "goal": [{ "clause": -1, "scope": -1, "term": "(main T1)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "1743": { "goal": [{ "clause": -1, "scope": -1, "term": "(hanoi T4 X6)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "type": "PlainIntegerConstant", "value": "1" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "name": "T4", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" } ] }, "ground": ["T4"], "free": ["X6"], "exprvars": ["T4"] } }, "1930": { "goal": [{ "clause": -1, "scope": -1, "term": "(user_defined_is X18 (1))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "1" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "name": "T4", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" }, { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "31" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" } ] }, "ground": [], "free": ["X18"], "exprvars": [ "T4", "T8" ] } }, "1774": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (=:= T8 (1)) (',' (!_2) (user_defined_is X18 (1))))" }, { "clause": 2, "scope": 2, "term": "(hanoi T8 X6)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "type": "PlainIntegerConstant", "value": "1" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "name": "T4", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" }, { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "31" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" } ] }, "ground": ["T8"], "free": [ "X6", "X18" ], "exprvars": [ "T4", "T8" ] } }, "6": { "goal": [{ "clause": 0, "scope": 1, "term": "(main T1)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "1771": { "goal": [ { "clause": 1, "scope": 2, "term": "(hanoi T4 X6)" }, { "clause": 2, "scope": 2, "term": "(hanoi T4 X6)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "type": "PlainIntegerConstant", "value": "1" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "name": "T4", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" } ] }, "ground": ["T4"], "free": ["X6"], "exprvars": ["T4"] } }, "1929": { "goal": [{ "clause": 2, "scope": 2, "term": "(hanoi T8 X6)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "!=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "1" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "name": "T4", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" }, { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "31" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" } ] }, "ground": ["T8"], "free": [ "X6", "X18" ], "exprvars": [ "T4", "T8" ] } }, "9": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (>= T4 (1)) (',' (=< T4 (31)) (hanoi T4 X6)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T4"], "free": ["X6"], "exprvars": [] } }, "1928": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (!_2) (user_defined_is X18 (1)))" }, { "clause": 2, "scope": 2, "term": "(hanoi T8 X6)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "1" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "name": "T4", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" }, { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "31" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" } ] }, "ground": ["T8"], "free": [ "X6", "X18" ], "exprvars": [ "T4", "T8" ] } }, "1933": { "goal": [{ "clause": -1, "scope": -1, "term": "(hanoi (- T12 (1)) X34)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "!=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "1" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "!=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "1" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "name": "T4", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" }, { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "31" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" }, { "lhs": { "name": "T4", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "31" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" }, { "lhs": { "name": "T4", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "name": "T4", "type": "PlainIntegerVariable" }, "operation": "<=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "31" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "31" }, "operation": "<=" } ] }, "ground": ["T12"], "free": ["X34"], "exprvars": [ "T4", "T12", "T8" ] } } }, "edges": [ { "from": 2, "to": 6, "label": "CASE" }, { "from": 6, "to": 9, "label": "ONLY EVAL with clause\nmain(X5) :- ','(>=(X5, 1), ','(=<(X5, 31), hanoi(X5, X6))).\nand substitutionT1 -> T4,\nX5 -> T4" }, { "from": 9, "to": 11, "label": "IS ERROR" }, { "from": 9, "to": 374, "label": "ARITHCOMP SUCCESS" }, { "from": 9, "to": 375, "label": "ARITHCOMP FAIL" }, { "from": 374, "to": 1743, "label": "ARITHCOMP SUCCESS" }, { "from": 374, "to": 1744, "label": "ARITHCOMP FAIL" }, { "from": 1743, "to": 1771, "label": "CASE" }, { "from": 1771, "to": 1774, "label": "ONLY EVAL with clause\nhanoi(X16, X17) :- ','(=:=(X16, 1), ','(!_2, user_defined_is(X17, 1))).\nand substitutionT4 -> T8,\nX16 -> T8,\nX6 -> X18,\nX17 -> X18" }, { "from": 1774, "to": 1928, "label": "ARITHCOMP SUCCESS" }, { "from": 1774, "to": 1929, "label": "ARITHCOMP FAIL" }, { "from": 1928, "to": 1930, "label": "CUT" }, { "from": 1929, "to": 1933, "label": "ONLY EVAL with clause\nhanoi(X32, X33) :- hanoi(-(X32, 1), X34).\nand substitutionT8 -> T12,\nX32 -> T12,\nX6 -> X35,\nX33 -> X35" }, { "from": 1930, "to": 1931, "label": "CASE" }, { "from": 1931, "to": 1932, "label": "BACKTRACK\nfor clause: user_defined_is(Ret, +(*(Ret1, 2), 1))because of non-unification" }, { "from": 1933, "to": 1743, "label": "INSTANCE with matching:\nT4 -> -(T12, 1)\nX6 -> X34" } ], "type": "Graph" } } ---------------------------------------- (110) Obligation: Rules: f1774_out(T8) -> f1771_out(T8) :|: TRUE f1771_in(x) -> f1774_in(x) :|: TRUE f1771_out(T4) -> f1743_out(T4) :|: TRUE f1743_in(x1) -> f1771_in(x1) :|: TRUE f1929_in(T12) -> f1933_in(T12) :|: TRUE f1933_out(x2) -> f1929_out(x2) :|: TRUE f1933_in(x3) -> f1743_in(x3 - 1) :|: TRUE f1743_out(x4 - 1) -> f1933_out(x4) :|: TRUE f1928_out(x5) -> f1774_out(x5) :|: x5 = 1 f1774_in(x6) -> f1929_in(x6) :|: !(x6 = 1) f1929_out(x7) -> f1774_out(x7) :|: !(x7 = 1) f1774_in(x8) -> f1928_in(x8) :|: x8 = 1 f2_in(T1) -> f6_in(T1) :|: TRUE f6_out(x9) -> f2_out(x9) :|: TRUE f6_in(x10) -> f9_in(x10) :|: TRUE f9_out(x11) -> f6_out(x11) :|: TRUE f374_out(x12) -> f9_out(x12) :|: x12 >= 1 f9_in(x13) -> f11_in :|: TRUE f9_in(x14) -> f374_in(x14) :|: x14 >= 1 f9_in(x15) -> f375_in(x15) :|: x15 < 1 f375_out(x16) -> f9_out(x16) :|: x16 < 1 f11_out -> f9_out(x17) :|: TRUE f1743_out(x18) -> f374_out(x18) :|: x18 <= 31 f1744_out(x19) -> f374_out(x19) :|: x19 > 31 f374_in(x20) -> f1744_in(x20) :|: x20 > 31 f374_in(x21) -> f1743_in(x21) :|: x21 <= 31 Start term: f2_in(T1) ---------------------------------------- (111) IRSwTSimpleDependencyGraphProof (EQUIVALENT) Constructed simple dependency graph. Simplified to the following IRSwTs: intTRSProblem: f1771_in(x) -> f1774_in(x) :|: TRUE f1743_in(x1) -> f1771_in(x1) :|: TRUE f1929_in(T12) -> f1933_in(T12) :|: TRUE f1933_in(x3) -> f1743_in(x3 - 1) :|: TRUE f1774_in(x6) -> f1929_in(x6) :|: !(x6 = 1) ---------------------------------------- (112) Obligation: Rules: f1771_in(x) -> f1774_in(x) :|: TRUE f1743_in(x1) -> f1771_in(x1) :|: TRUE f1929_in(T12) -> f1933_in(T12) :|: TRUE f1933_in(x3) -> f1743_in(x3 - 1) :|: TRUE f1774_in(x6) -> f1929_in(x6) :|: !(x6 = 1) ---------------------------------------- (113) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (114) Obligation: Rules: f1929_in(T12:0) -> f1929_in(T12:0 - 1) :|: T12:0 < 2 f1929_in(x) -> f1929_in(x - 1) :|: x > 2 ---------------------------------------- (115) IRSFormatTransformerProof (EQUIVALENT) Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). ---------------------------------------- (116) Obligation: Rules: f1929_in(T12:0) -> f1929_in(arith) :|: T12:0 < 2 && arith = T12:0 - 1 f1929_in(x1) -> f1929_in(x2) :|: x1 > 2 && x2 = x1 - 1 ---------------------------------------- (117) IRSwTTerminationDigraphProof (EQUIVALENT) Constructed termination digraph! Nodes: (1) f1929_in(T12:0) -> f1929_in(arith) :|: T12:0 < 2 && arith = T12:0 - 1 (2) f1929_in(x1) -> f1929_in(x2) :|: x1 > 2 && x2 = x1 - 1 Arcs: (1) -> (1) (2) -> (2) This digraph is fully evaluated! ---------------------------------------- (118) Complex Obligation (AND) ---------------------------------------- (119) Obligation: Termination digraph: Nodes: (1) f1929_in(x1) -> f1929_in(x2) :|: x1 > 2 && x2 = x1 - 1 Arcs: (1) -> (1) This digraph is fully evaluated! ---------------------------------------- (120) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (121) Obligation: Rules: f1929_in(x1:0) -> f1929_in(x1:0 - 1) :|: x1:0 > 2 ---------------------------------------- (122) TempFilterProof (SOUND) Used the following sort dictionary for filtering: f1929_in(INTEGER) Replaced non-predefined constructor symbols by 0. ---------------------------------------- (123) Obligation: Rules: f1929_in(x1:0) -> f1929_in(c) :|: c = x1:0 - 1 && x1:0 > 2 ---------------------------------------- (124) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f1929_in(x)] = x The following rules are decreasing: f1929_in(x1:0) -> f1929_in(c) :|: c = x1:0 - 1 && x1:0 > 2 The following rules are bounded: f1929_in(x1:0) -> f1929_in(c) :|: c = x1:0 - 1 && x1:0 > 2 ---------------------------------------- (125) YES ---------------------------------------- (126) Obligation: Termination digraph: Nodes: (1) f1929_in(T12:0) -> f1929_in(arith) :|: T12:0 < 2 && arith = T12:0 - 1 Arcs: (1) -> (1) This digraph is fully evaluated! ---------------------------------------- (127) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (128) Obligation: Rules: f1929_in(T12:0:0) -> f1929_in(T12:0:0 - 1) :|: T12:0:0 < 2 ---------------------------------------- (129) IRSwTToIntTRSProof (SOUND) Applied path-length measure to transform intTRS with terms to intTRS. ---------------------------------------- (130) Obligation: Rules: f1929_in(x) -> f1929_in(x - 1) :|: x < 2 ---------------------------------------- (131) IntTRSNonPeriodicNontermProof (COMPLETE) Normalized system to the following form: f(pc, x) -> f(1, x - 1) :|: pc = 1 && x < 2 Proved unsatisfiability of the following formula, indicating that the system is never left after entering: (((run2_0 = ((1 * 1)) and run2_1 = ((run1_1 * 1) + (1 * -1))) and (((run1_0 * 1)) = ((1 * 1)) and ((run1_1 * 1)) < ((1 * 2)))) and !(((run2_0 * 1)) = ((1 * 1)) and ((run2_1 * 1)) < ((1 * 2)))) Proved satisfiability of the following formula, indicating that the system is entered at least once: ((run2_0 = ((1 * 1)) and run2_1 = ((run1_1 * 1) + (1 * -1))) and (((run1_0 * 1)) = ((1 * 1)) and ((run1_1 * 1)) < ((1 * 2)))) ---------------------------------------- (132) NO