0.07/0.10 YES 0.07/0.12 We consider the system theBenchmark. 0.07/0.12 0.07/0.12 Alphabet: 0.07/0.12 0.07/0.12 and : [form * form] --> form 0.07/0.12 exists : [term -> form] --> form 0.07/0.12 forall : [term -> form] --> form 0.07/0.12 not : [form] --> form 0.07/0.12 or : [form * form] --> form 0.07/0.12 0.07/0.12 Rules: 0.07/0.12 0.07/0.12 and(x, forall(/\y.f y)) => forall(/\z.and(x, f z)) 0.07/0.12 and(forall(/\x.f x), y) => forall(/\z.and(f z, y)) 0.07/0.12 and(x, exists(/\y.f y)) => exists(/\z.and(x, f z)) 0.07/0.12 and(exists(/\x.f x), y) => exists(/\z.and(f z, y)) 0.07/0.12 or(x, forall(/\y.f y)) => forall(/\z.or(x, f z)) 0.07/0.12 or(forall(/\x.f x), y) => forall(/\z.or(f z, y)) 0.07/0.12 or(x, exists(/\y.f y)) => exists(/\z.or(x, f z)) 0.07/0.12 or(exists(/\x.f x), y) => exists(/\z.or(f z, y)) 0.07/0.12 not(forall(/\x.f x)) => exists(/\y.not(f y)) 0.07/0.12 not(exists(/\x.f x)) => forall(/\y.not(f y)) 0.07/0.12 0.07/0.12 Using the transformations described in [Kop11], this system can be brought in a form without leading free variables in the left-hand side, and where the left-hand side of a variable is always a functional term or application headed by a functional term. 0.07/0.12 0.07/0.12 We now transform the resulting AFS into an AFSM by replacing all free variables by meta-variables (with arity 0). This leads to the following AFSM: 0.07/0.12 0.07/0.12 Alphabet: 0.07/0.12 0.07/0.12 and : [form * form] --> form 0.07/0.12 exists : [term -> form] --> form 0.07/0.12 forall : [term -> form] --> form 0.07/0.12 not : [form] --> form 0.07/0.12 or : [form * form] --> form 0.07/0.12 ~AP1 : [term -> form * term] --> form 0.07/0.12 0.07/0.12 Rules: 0.07/0.12 0.07/0.12 and(X, forall(/\x.~AP1(F, x))) => forall(/\y.and(X, ~AP1(F, y))) 0.07/0.12 and(forall(/\x.~AP1(F, x)), X) => forall(/\y.and(~AP1(F, y), X)) 0.07/0.12 and(X, exists(/\x.~AP1(F, x))) => exists(/\y.and(X, ~AP1(F, y))) 0.07/0.12 and(exists(/\x.~AP1(F, x)), X) => exists(/\y.and(~AP1(F, y), X)) 0.07/0.12 or(X, forall(/\x.~AP1(F, x))) => forall(/\y.or(X, ~AP1(F, y))) 0.07/0.12 or(forall(/\x.~AP1(F, x)), X) => forall(/\y.or(~AP1(F, y), X)) 0.07/0.12 or(X, exists(/\x.~AP1(F, x))) => exists(/\y.or(X, ~AP1(F, y))) 0.07/0.12 or(exists(/\x.~AP1(F, x)), X) => exists(/\y.or(~AP1(F, y), X)) 0.07/0.12 not(forall(/\x.~AP1(F, x))) => exists(/\y.not(~AP1(F, y))) 0.07/0.12 not(exists(/\x.~AP1(F, x))) => forall(/\y.not(~AP1(F, y))) 0.07/0.12 ~AP1(F, X) => F X 0.07/0.12 0.07/0.12 Symbol ~AP1 is an encoding for application that is only used in innocuous ways. We can simplify the program (without losing non-termination) by removing it. This gives: 0.07/0.12 0.07/0.12 Alphabet: 0.07/0.12 0.07/0.12 and : [form * form] --> form 0.07/0.12 exists : [term -> form] --> form 0.07/0.12 forall : [term -> form] --> form 0.07/0.12 not : [form] --> form 0.07/0.12 or : [form * form] --> form 0.07/0.12 0.07/0.12 Rules: 0.07/0.12 0.07/0.12 and(X, forall(/\x.Y(x))) => forall(/\y.and(X, Y(y))) 0.07/0.12 and(forall(/\x.X(x)), Y) => forall(/\y.and(X(y), Y)) 0.07/0.12 and(X, exists(/\x.Y(x))) => exists(/\y.and(X, Y(y))) 0.07/0.12 and(exists(/\x.X(x)), Y) => exists(/\y.and(X(y), Y)) 0.07/0.12 or(X, forall(/\x.Y(x))) => forall(/\y.or(X, Y(y))) 0.07/0.12 or(forall(/\x.X(x)), Y) => forall(/\y.or(X(y), Y)) 0.07/0.12 or(X, exists(/\x.Y(x))) => exists(/\y.or(X, Y(y))) 0.07/0.12 or(exists(/\x.X(x)), Y) => exists(/\y.or(X(y), Y)) 0.07/0.12 not(forall(/\x.X(x))) => exists(/\y.not(X(y))) 0.07/0.12 not(exists(/\x.X(x))) => forall(/\y.not(X(y))) 0.07/0.12 0.07/0.12 We use rule removal, following [Kop12, Theorem 2.23]. 0.07/0.12 0.07/0.12 This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 0.07/0.12 0.07/0.12 and(X, forall(/\x.Y(x))) >? forall(/\y.and(X, Y(y))) 0.07/0.12 and(forall(/\x.X(x)), Y) >? forall(/\y.and(X(y), Y)) 0.07/0.12 and(X, exists(/\x.Y(x))) >? exists(/\y.and(X, Y(y))) 0.07/0.12 and(exists(/\x.X(x)), Y) >? exists(/\y.and(X(y), Y)) 0.07/0.12 or(X, forall(/\x.Y(x))) >? forall(/\y.or(X, Y(y))) 0.07/0.12 or(forall(/\x.X(x)), Y) >? forall(/\y.or(X(y), Y)) 0.07/0.12 or(X, exists(/\x.Y(x))) >? exists(/\y.or(X, Y(y))) 0.07/0.12 or(exists(/\x.X(x)), Y) >? exists(/\y.or(X(y), Y)) 0.07/0.12 not(forall(/\x.X(x))) >? exists(/\y.not(X(y))) 0.07/0.12 not(exists(/\x.X(x))) >? forall(/\y.not(X(y))) 0.07/0.12 0.07/0.12 We orient these requirements with a polynomial interpretation in the natural numbers. 0.07/0.12 0.07/0.12 The following interpretation satisfies the requirements: 0.07/0.12 0.07/0.12 and = \y0y1.y0 + 2y1 0.07/0.12 exists = \G0.1 + G0(0) 0.07/0.12 forall = \G0.1 + G0(0) 0.07/0.12 not = \y0.y0 0.07/0.12 or = \y0y1.y0 + 2y1 0.07/0.12 0.07/0.12 Using this interpretation, the requirements translate to: 0.07/0.12 0.07/0.12 [[and(_x0, forall(/\x._x1(x)))]] = 2 + x0 + 2F1(0) > 1 + x0 + 2F1(0) = [[forall(/\x.and(_x0, _x1(x)))]] 0.07/0.12 [[and(forall(/\x._x0(x)), _x1)]] = 1 + 2x1 + F0(0) >= 1 + 2x1 + F0(0) = [[forall(/\x.and(_x0(x), _x1))]] 0.07/0.12 [[and(_x0, exists(/\x._x1(x)))]] = 2 + x0 + 2F1(0) > 1 + x0 + 2F1(0) = [[exists(/\x.and(_x0, _x1(x)))]] 0.07/0.12 [[and(exists(/\x._x0(x)), _x1)]] = 1 + 2x1 + F0(0) >= 1 + 2x1 + F0(0) = [[exists(/\x.and(_x0(x), _x1))]] 0.07/0.12 [[or(_x0, forall(/\x._x1(x)))]] = 2 + x0 + 2F1(0) > 1 + x0 + 2F1(0) = [[forall(/\x.or(_x0, _x1(x)))]] 0.07/0.12 [[or(forall(/\x._x0(x)), _x1)]] = 1 + 2x1 + F0(0) >= 1 + 2x1 + F0(0) = [[forall(/\x.or(_x0(x), _x1))]] 0.07/0.12 [[or(_x0, exists(/\x._x1(x)))]] = 2 + x0 + 2F1(0) > 1 + x0 + 2F1(0) = [[exists(/\x.or(_x0, _x1(x)))]] 0.07/0.12 [[or(exists(/\x._x0(x)), _x1)]] = 1 + 2x1 + F0(0) >= 1 + 2x1 + F0(0) = [[exists(/\x.or(_x0(x), _x1))]] 0.07/0.12 [[not(forall(/\x._x0(x)))]] = 1 + F0(0) >= 1 + F0(0) = [[exists(/\x.not(_x0(x)))]] 0.07/0.12 [[not(exists(/\x._x0(x)))]] = 1 + F0(0) >= 1 + F0(0) = [[forall(/\x.not(_x0(x)))]] 0.07/0.12 0.07/0.12 We can thus remove the following rules: 0.07/0.12 0.07/0.12 and(X, forall(/\x.Y(x))) => forall(/\y.and(X, Y(y))) 0.07/0.12 and(X, exists(/\x.Y(x))) => exists(/\y.and(X, Y(y))) 0.07/0.12 or(X, forall(/\x.Y(x))) => forall(/\y.or(X, Y(y))) 0.07/0.12 or(X, exists(/\x.Y(x))) => exists(/\y.or(X, Y(y))) 0.07/0.12 0.07/0.12 We use rule removal, following [Kop12, Theorem 2.23]. 0.07/0.12 0.07/0.12 This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 0.07/0.12 0.07/0.12 and(forall(/\x.X(x)), Y) >? forall(/\y.and(X(y), Y)) 0.07/0.12 and(exists(/\x.X(x)), Y) >? exists(/\y.and(X(y), Y)) 0.07/0.12 or(forall(/\x.X(x)), Y) >? forall(/\y.or(X(y), Y)) 0.07/0.12 or(exists(/\x.X(x)), Y) >? exists(/\y.or(X(y), Y)) 0.07/0.12 not(forall(/\x.X(x))) >? exists(/\y.not(X(y))) 0.07/0.12 not(exists(/\x.X(x))) >? forall(/\y.not(X(y))) 0.07/0.12 0.07/0.12 We orient these requirements with a polynomial interpretation in the natural numbers. 0.07/0.12 0.07/0.12 The following interpretation satisfies the requirements: 0.07/0.12 0.07/0.12 and = \y0y1.2 + y1 + 3y0 0.07/0.12 exists = \G0.3 + G0(0) 0.07/0.12 forall = \G0.3 + G0(0) 0.07/0.12 not = \y0.3y0 0.07/0.12 or = \y0y1.2 + y1 + 3y0 0.07/0.12 0.07/0.12 Using this interpretation, the requirements translate to: 0.07/0.12 0.07/0.12 [[and(forall(/\x._x0(x)), _x1)]] = 11 + x1 + 3F0(0) > 5 + x1 + 3F0(0) = [[forall(/\x.and(_x0(x), _x1))]] 0.07/0.12 [[and(exists(/\x._x0(x)), _x1)]] = 11 + x1 + 3F0(0) > 5 + x1 + 3F0(0) = [[exists(/\x.and(_x0(x), _x1))]] 0.07/0.12 [[or(forall(/\x._x0(x)), _x1)]] = 11 + x1 + 3F0(0) > 5 + x1 + 3F0(0) = [[forall(/\x.or(_x0(x), _x1))]] 0.07/0.12 [[or(exists(/\x._x0(x)), _x1)]] = 11 + x1 + 3F0(0) > 5 + x1 + 3F0(0) = [[exists(/\x.or(_x0(x), _x1))]] 0.07/0.12 [[not(forall(/\x._x0(x)))]] = 9 + 3F0(0) > 3 + 3F0(0) = [[exists(/\x.not(_x0(x)))]] 0.07/0.12 [[not(exists(/\x._x0(x)))]] = 9 + 3F0(0) > 3 + 3F0(0) = [[forall(/\x.not(_x0(x)))]] 0.07/0.12 0.07/0.12 We can thus remove the following rules: 0.07/0.12 0.07/0.12 and(forall(/\x.X(x)), Y) => forall(/\y.and(X(y), Y)) 0.07/0.12 and(exists(/\x.X(x)), Y) => exists(/\y.and(X(y), Y)) 0.07/0.12 or(forall(/\x.X(x)), Y) => forall(/\y.or(X(y), Y)) 0.07/0.12 or(exists(/\x.X(x)), Y) => exists(/\y.or(X(y), Y)) 0.07/0.12 not(forall(/\x.X(x))) => exists(/\y.not(X(y))) 0.07/0.12 not(exists(/\x.X(x))) => forall(/\y.not(X(y))) 0.07/0.12 0.07/0.12 All rules were succesfully removed. Thus, termination of the original system has been reduced to termination of the beta-rule, which is well-known to hold. 0.07/0.12 0.07/0.12 0.07/0.12 +++ Citations +++ 0.07/0.12 0.07/0.12 [Kop11] C. Kop. Simplifying Algebraic Functional Systems. In Proceedings of CAI 2011, volume 6742 of LNCS. 201--215, Springer, 2011. 0.07/0.12 [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. 0.07/0.12 EOF