We consider the system prenex. Alphabet: and : [form * form] --> form exists : [form -> form] --> form forall : [form -> form] --> form not : [form] --> form or : [form * form] --> form Rules: and(x, forall(/\y.f y)) => forall(/\z.and(x, f z)) or(x, forall(/\y.f y)) => forall(/\z.or(x, f z)) and(forall(/\x.f x), y) => forall(/\z.and(f z, y)) or(forall(/\x.f x), y) => forall(/\z.or(f z, y)) not(forall(/\x.f x)) => exists(/\y.not(f y)) and(x, exists(/\y.f y)) => exists(/\z.and(x, f z)) or(x, exists(/\y.f y)) => exists(/\z.or(x, f z)) and(exists(/\x.f x), y) => exists(/\z.and(f z, y)) or(exists(/\x.f x), y) => exists(/\z.or(f z, y)) not(exists(/\x.f x)) => forall(/\y.not(f y)) 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. 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: Alphabet: and : [form * form] --> form exists : [form -> form] --> form forall : [form -> form] --> form not : [form] --> form or : [form * form] --> form ~AP1 : [form -> form * form] --> form Rules: and(X, forall(/\x.~AP1(F, x))) => forall(/\y.and(X, ~AP1(F, y))) or(X, forall(/\x.~AP1(F, x))) => forall(/\y.or(X, ~AP1(F, y))) and(forall(/\x.~AP1(F, x)), X) => forall(/\y.and(~AP1(F, y), X)) or(forall(/\x.~AP1(F, x)), X) => forall(/\y.or(~AP1(F, y), X)) not(forall(/\x.~AP1(F, x))) => exists(/\y.not(~AP1(F, y))) and(X, exists(/\x.~AP1(F, x))) => exists(/\y.and(X, ~AP1(F, y))) or(X, exists(/\x.~AP1(F, x))) => exists(/\y.or(X, ~AP1(F, y))) and(exists(/\x.~AP1(F, x)), X) => exists(/\y.and(~AP1(F, y), X)) or(exists(/\x.~AP1(F, x)), X) => exists(/\y.or(~AP1(F, y), X)) not(exists(/\x.~AP1(F, x))) => forall(/\y.not(~AP1(F, y))) ~AP1(F, X) => F X 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: Alphabet: and : [form * form] --> form exists : [form -> form] --> form forall : [form -> form] --> form not : [form] --> form or : [form * form] --> form Rules: and(X, forall(/\x.Y(x))) => forall(/\y.and(X, Y(y))) or(X, forall(/\x.Y(x))) => forall(/\y.or(X, Y(y))) and(forall(/\x.X(x)), Y) => forall(/\y.and(X(y), Y)) or(forall(/\x.X(x)), Y) => forall(/\y.or(X(y), Y)) not(forall(/\x.X(x))) => exists(/\y.not(X(y))) and(X, exists(/\x.Y(x))) => exists(/\y.and(X, Y(y))) or(X, exists(/\x.Y(x))) => exists(/\y.or(X, Y(y))) and(exists(/\x.X(x)), Y) => exists(/\y.and(X(y), Y)) or(exists(/\x.X(x)), Y) => exists(/\y.or(X(y), Y)) not(exists(/\x.X(x))) => forall(/\y.not(X(y))) We use the dependency pair framework as described in [Kop12, Ch. 6/7], with dynamic dependency pairs. We thus obtain the following dependency pair problem (P_0, R_0, minimal, formative): Dependency Pairs P_0: 0] and#(X, forall(/\x.Y(x))) =#> and#(X, Y(y)) 1] and#(X, forall(/\x.Y(x))) =#> Y(y) 2] or#(X, forall(/\x.Y(x))) =#> or#(X, Y(y)) 3] or#(X, forall(/\x.Y(x))) =#> Y(y) 4] and#(forall(/\x.X(x)), Y) =#> and#(X(y), Y) 5] and#(forall(/\x.X(x)), Y) =#> X(y) 6] or#(forall(/\x.X(x)), Y) =#> or#(X(y), Y) 7] or#(forall(/\x.X(x)), Y) =#> X(y) 8] not#(forall(/\x.X(x))) =#> not#(X(y)) 9] not#(forall(/\x.X(x))) =#> X(y) 10] and#(X, exists(/\x.Y(x))) =#> and#(X, Y(y)) 11] and#(X, exists(/\x.Y(x))) =#> Y(y) 12] or#(X, exists(/\x.Y(x))) =#> or#(X, Y(y)) 13] or#(X, exists(/\x.Y(x))) =#> Y(y) 14] and#(exists(/\x.X(x)), Y) =#> and#(X(y), Y) 15] and#(exists(/\x.X(x)), Y) =#> X(y) 16] or#(exists(/\x.X(x)), Y) =#> or#(X(y), Y) 17] or#(exists(/\x.X(x)), Y) =#> X(y) 18] not#(exists(/\x.X(x))) =#> not#(X(y)) 19] not#(exists(/\x.X(x))) =#> X(y) Rules R_0: and(X, forall(/\x.Y(x))) => forall(/\y.and(X, Y(y))) or(X, forall(/\x.Y(x))) => forall(/\y.or(X, Y(y))) and(forall(/\x.X(x)), Y) => forall(/\y.and(X(y), Y)) or(forall(/\x.X(x)), Y) => forall(/\y.or(X(y), Y)) not(forall(/\x.X(x))) => exists(/\y.not(X(y))) and(X, exists(/\x.Y(x))) => exists(/\y.and(X, Y(y))) or(X, exists(/\x.Y(x))) => exists(/\y.or(X, Y(y))) and(exists(/\x.X(x)), Y) => exists(/\y.and(X(y), Y)) or(exists(/\x.X(x)), Y) => exists(/\y.or(X(y), Y)) not(exists(/\x.X(x))) => forall(/\y.not(X(y))) Thus, the original system is terminating if (P_0, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_0, R_0, minimal, formative). We will use the reduction pair processor [Kop12, Thm. 7.16]. As the system is abstraction-simple and the formative flag is set, it suffices to find a tagged reduction pair [Kop12, Def. 6.70]. Thus, we must orient: and#(X, forall(/\x.Y(x))) >? and#(X, Y(~c0)) and#(X, forall(/\x.Y(x))) >? Y(~c1) or#(X, forall(/\x.Y(x))) >? or#(X, Y(~c2)) or#(X, forall(/\x.Y(x))) >? Y(~c3) and#(forall(/\x.X(x)), Y) >? and#(X(~c4), Y) and#(forall(/\x.X(x)), Y) >? X(~c5) or#(forall(/\x.X(x)), Y) >? or#(X(~c6), Y) or#(forall(/\x.X(x)), Y) >? X(~c7) not#(forall(/\x.X(x))) >? not#(X(~c8)) not#(forall(/\x.X(x))) >? X(~c9) and#(X, exists(/\x.Y(x))) >? and#(X, Y(~c10)) and#(X, exists(/\x.Y(x))) >? Y(~c11) or#(X, exists(/\x.Y(x))) >? or#(X, Y(~c12)) or#(X, exists(/\x.Y(x))) >? Y(~c13) and#(exists(/\x.X(x)), Y) >? and#(X(~c14), Y) and#(exists(/\x.X(x)), Y) >? X(~c15) or#(exists(/\x.X(x)), Y) >? or#(X(~c16), Y) or#(exists(/\x.X(x)), Y) >? X(~c17) not#(exists(/\x.X(x))) >? not#(X(~c18)) not#(exists(/\x.X(x))) >? X(~c19) and(X, forall(/\x.Y(x))) >= forall(/\y.and-(X, Y(y))) or(X, forall(/\x.Y(x))) >= forall(/\y.or-(X, Y(y))) and(forall(/\x.X(x)), Y) >= forall(/\y.and-(X(y), Y)) or(forall(/\x.X(x)), Y) >= forall(/\y.or-(X(y), Y)) not(forall(/\x.X(x))) >= exists(/\y.not-(X(y))) and(X, exists(/\x.Y(x))) >= exists(/\y.and-(X, Y(y))) or(X, exists(/\x.Y(x))) >= exists(/\y.or-(X, Y(y))) and(exists(/\x.X(x)), Y) >= exists(/\y.and-(X(y), Y)) or(exists(/\x.X(x)), Y) >= exists(/\y.or-(X(y), Y)) not(exists(/\x.X(x))) >= forall(/\y.not-(X(y))) and-(X, Y) >= and(X, Y) and-(X, Y) >= and#(X, Y) not-(X) >= not(X) not-(X) >= not#(X) or-(X, Y) >= or(X, Y) or-(X, Y) >= or#(X, Y) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: and = \y0y1.1 + y0 + y1 and- = \y0y1.1 + y0 + y1 and# = \y0y1.1 + y0 + y1 exists = \G0.G0(0) forall = \G0.G0(0) not = \y0.y0 not- = \y0.y0 not# = \y0.y0 or = \y0y1.y1 + 2y0 or- = \y0y1.y1 + 2y0 or# = \y0y1.y0 + y1 ~c0 = 0 ~c1 = 0 ~c10 = 0 ~c11 = 0 ~c12 = 0 ~c13 = 0 ~c14 = 0 ~c15 = 0 ~c16 = 0 ~c17 = 0 ~c18 = 0 ~c19 = 0 ~c2 = 0 ~c3 = 0 ~c4 = 0 ~c5 = 0 ~c6 = 0 ~c7 = 0 ~c8 = 0 ~c9 = 0 Using this interpretation, the requirements translate to: [[and#(_x0, forall(/\x._x1(x)))]] = 1 + x0 + F1(0) >= 1 + x0 + F1(0) = [[and#(_x0, _x1(~c0))]] [[and#(_x0, forall(/\x._x1(x)))]] = 1 + x0 + F1(0) > F1(0) = [[_x1(~c1)]] [[or#(_x0, forall(/\x._x1(x)))]] = x0 + F1(0) >= x0 + F1(0) = [[or#(_x0, _x1(~c2))]] [[or#(_x0, forall(/\x._x1(x)))]] = x0 + F1(0) >= F1(0) = [[_x1(~c3)]] [[and#(forall(/\x._x0(x)), _x1)]] = 1 + x1 + F0(0) >= 1 + x1 + F0(0) = [[and#(_x0(~c4), _x1)]] [[and#(forall(/\x._x0(x)), _x1)]] = 1 + x1 + F0(0) > F0(0) = [[_x0(~c5)]] [[or#(forall(/\x._x0(x)), _x1)]] = x1 + F0(0) >= x1 + F0(0) = [[or#(_x0(~c6), _x1)]] [[or#(forall(/\x._x0(x)), _x1)]] = x1 + F0(0) >= F0(0) = [[_x0(~c7)]] [[not#(forall(/\x._x0(x)))]] = F0(0) >= F0(0) = [[not#(_x0(~c8))]] [[not#(forall(/\x._x0(x)))]] = F0(0) >= F0(0) = [[_x0(~c9)]] [[and#(_x0, exists(/\x._x1(x)))]] = 1 + x0 + F1(0) >= 1 + x0 + F1(0) = [[and#(_x0, _x1(~c10))]] [[and#(_x0, exists(/\x._x1(x)))]] = 1 + x0 + F1(0) > F1(0) = [[_x1(~c11)]] [[or#(_x0, exists(/\x._x1(x)))]] = x0 + F1(0) >= x0 + F1(0) = [[or#(_x0, _x1(~c12))]] [[or#(_x0, exists(/\x._x1(x)))]] = x0 + F1(0) >= F1(0) = [[_x1(~c13)]] [[and#(exists(/\x._x0(x)), _x1)]] = 1 + x1 + F0(0) >= 1 + x1 + F0(0) = [[and#(_x0(~c14), _x1)]] [[and#(exists(/\x._x0(x)), _x1)]] = 1 + x1 + F0(0) > F0(0) = [[_x0(~c15)]] [[or#(exists(/\x._x0(x)), _x1)]] = x1 + F0(0) >= x1 + F0(0) = [[or#(_x0(~c16), _x1)]] [[or#(exists(/\x._x0(x)), _x1)]] = x1 + F0(0) >= F0(0) = [[_x0(~c17)]] [[not#(exists(/\x._x0(x)))]] = F0(0) >= F0(0) = [[not#(_x0(~c18))]] [[not#(exists(/\x._x0(x)))]] = F0(0) >= F0(0) = [[_x0(~c19)]] [[and(_x0, forall(/\x._x1(x)))]] = 1 + x0 + F1(0) >= 1 + x0 + F1(0) = [[forall(/\x.and-(_x0, _x1(x)))]] [[or(_x0, forall(/\x._x1(x)))]] = 2x0 + F1(0) >= 2x0 + F1(0) = [[forall(/\x.or-(_x0, _x1(x)))]] [[and(forall(/\x._x0(x)), _x1)]] = 1 + x1 + F0(0) >= 1 + x1 + F0(0) = [[forall(/\x.and-(_x0(x), _x1))]] [[or(forall(/\x._x0(x)), _x1)]] = x1 + 2F0(0) >= x1 + 2F0(0) = [[forall(/\x.or-(_x0(x), _x1))]] [[not(forall(/\x._x0(x)))]] = F0(0) >= F0(0) = [[exists(/\x.not-(_x0(x)))]] [[and(_x0, exists(/\x._x1(x)))]] = 1 + x0 + F1(0) >= 1 + x0 + F1(0) = [[exists(/\x.and-(_x0, _x1(x)))]] [[or(_x0, exists(/\x._x1(x)))]] = 2x0 + F1(0) >= 2x0 + F1(0) = [[exists(/\x.or-(_x0, _x1(x)))]] [[and(exists(/\x._x0(x)), _x1)]] = 1 + x1 + F0(0) >= 1 + x1 + F0(0) = [[exists(/\x.and-(_x0(x), _x1))]] [[or(exists(/\x._x0(x)), _x1)]] = x1 + 2F0(0) >= x1 + 2F0(0) = [[exists(/\x.or-(_x0(x), _x1))]] [[not(exists(/\x._x0(x)))]] = F0(0) >= F0(0) = [[forall(/\x.not-(_x0(x)))]] [[and-(_x0, _x1)]] = 1 + x0 + x1 >= 1 + x0 + x1 = [[and(_x0, _x1)]] [[and-(_x0, _x1)]] = 1 + x0 + x1 >= 1 + x0 + x1 = [[and#(_x0, _x1)]] [[not-(_x0)]] = x0 >= x0 = [[not(_x0)]] [[not-(_x0)]] = x0 >= x0 = [[not#(_x0)]] [[or-(_x0, _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[or(_x0, _x1)]] [[or-(_x0, _x1)]] = x1 + 2x0 >= x0 + x1 = [[or#(_x0, _x1)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_0, R_0, minimal, formative) by (P_1, R_0, minimal, formative), where P_1 consists of: and#(X, forall(/\x.Y(x))) =#> and#(X, Y(y)) or#(X, forall(/\x.Y(x))) =#> or#(X, Y(y)) or#(X, forall(/\x.Y(x))) =#> Y(y) and#(forall(/\x.X(x)), Y) =#> and#(X(y), Y) or#(forall(/\x.X(x)), Y) =#> or#(X(y), Y) or#(forall(/\x.X(x)), Y) =#> X(y) not#(forall(/\x.X(x))) =#> not#(X(y)) not#(forall(/\x.X(x))) =#> X(y) and#(X, exists(/\x.Y(x))) =#> and#(X, Y(y)) or#(X, exists(/\x.Y(x))) =#> or#(X, Y(y)) or#(X, exists(/\x.Y(x))) =#> Y(y) and#(exists(/\x.X(x)), Y) =#> and#(X(y), Y) or#(exists(/\x.X(x)), Y) =#> or#(X(y), Y) or#(exists(/\x.X(x)), Y) =#> X(y) not#(exists(/\x.X(x))) =#> not#(X(y)) not#(exists(/\x.X(x))) =#> X(y) Thus, the original system is terminating if (P_1, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_1, R_0, minimal, formative). We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: * 0 : 0, 3, 8, 11 * 1 : 1, 2, 4, 5, 9, 10, 12, 13 * 2 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * 3 : 0, 3, 8, 11 * 4 : 1, 2, 4, 5, 9, 10, 12, 13 * 5 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * 6 : 6, 7, 14, 15 * 7 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * 8 : 0, 3, 8, 11 * 9 : 1, 2, 4, 5, 9, 10, 12, 13 * 10 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * 11 : 0, 3, 8, 11 * 12 : 1, 2, 4, 5, 9, 10, 12, 13 * 13 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * 14 : 6, 7, 14, 15 * 15 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 This graph has the following strongly connected components: P_2: and#(X, forall(/\x.Y(x))) =#> and#(X, Y(y)) and#(forall(/\x.X(x)), Y) =#> and#(X(y), Y) and#(X, exists(/\x.Y(x))) =#> and#(X, Y(y)) and#(exists(/\x.X(x)), Y) =#> and#(X(y), Y) P_3: or#(X, forall(/\x.Y(x))) =#> or#(X, Y(y)) or#(X, forall(/\x.Y(x))) =#> Y(y) or#(forall(/\x.X(x)), Y) =#> or#(X(y), Y) or#(forall(/\x.X(x)), Y) =#> X(y) not#(forall(/\x.X(x))) =#> not#(X(y)) not#(forall(/\x.X(x))) =#> X(y) or#(X, exists(/\x.Y(x))) =#> or#(X, Y(y)) or#(X, exists(/\x.Y(x))) =#> Y(y) or#(exists(/\x.X(x)), Y) =#> or#(X(y), Y) or#(exists(/\x.X(x)), Y) =#> X(y) not#(exists(/\x.X(x))) =#> not#(X(y)) not#(exists(/\x.X(x))) =#> X(y) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_1, R_0, m, f) by (P_2, R_0, m, f) and (P_3, R_0, m, f). Thus, the original system is terminating if each of (P_2, R_0, minimal, formative) and (P_3, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_3, R_0, minimal, formative). We will use the reduction pair processor [Kop12, Thm. 7.16]. As the system is abstraction-simple and the formative flag is set, it suffices to find a tagged reduction pair [Kop12, Def. 6.70]. Thus, we must orient: or#(X, forall(/\x.Y(x))) >? or#(X, Y(~c0)) or#(X, forall(/\x.Y(x))) >? Y(~c1) or#(forall(/\x.X(x)), Y) >? or#(X(~c2), Y) or#(forall(/\x.X(x)), Y) >? X(~c3) not#(forall(/\x.X(x))) >? not#(X(~c4)) not#(forall(/\x.X(x))) >? X(~c5) or#(X, exists(/\x.Y(x))) >? or#(X, Y(~c6)) or#(X, exists(/\x.Y(x))) >? Y(~c7) or#(exists(/\x.X(x)), Y) >? or#(X(~c8), Y) or#(exists(/\x.X(x)), Y) >? X(~c9) not#(exists(/\x.X(x))) >? not#(X(~c10)) not#(exists(/\x.X(x))) >? X(~c11) and(X, forall(/\x.Y(x))) >= forall(/\y.and-(X, Y(y))) or(X, forall(/\x.Y(x))) >= forall(/\y.or-(X, Y(y))) and(forall(/\x.X(x)), Y) >= forall(/\y.and-(X(y), Y)) or(forall(/\x.X(x)), Y) >= forall(/\y.or-(X(y), Y)) not(forall(/\x.X(x))) >= exists(/\y.not-(X(y))) and(X, exists(/\x.Y(x))) >= exists(/\y.and-(X, Y(y))) or(X, exists(/\x.Y(x))) >= exists(/\y.or-(X, Y(y))) and(exists(/\x.X(x)), Y) >= exists(/\y.and-(X(y), Y)) or(exists(/\x.X(x)), Y) >= exists(/\y.or-(X(y), Y)) not(exists(/\x.X(x))) >= forall(/\y.not-(X(y))) and-(X, Y) >= and(X, Y) not-(X) >= not(X) not-(X) >= not#(X) or-(X, Y) >= or(X, Y) or-(X, Y) >= or#(X, Y) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: and = \y0y1.y0 + y1 and- = \y0y1.y0 + y1 exists = \G0.G0(0) forall = \G0.G0(0) not = \y0.2 + 2y0 not- = \y0.2 + 2y0 not# = \y0.2 + y0 or = \y0y1.y1 + 2y0 or- = \y0y1.y1 + 2y0 or# = \y0y1.y0 + y1 ~c0 = 0 ~c1 = 0 ~c10 = 0 ~c11 = 0 ~c2 = 0 ~c3 = 0 ~c4 = 0 ~c5 = 0 ~c6 = 0 ~c7 = 0 ~c8 = 0 ~c9 = 0 Using this interpretation, the requirements translate to: [[or#(_x0, forall(/\x._x1(x)))]] = x0 + F1(0) >= x0 + F1(0) = [[or#(_x0, _x1(~c0))]] [[or#(_x0, forall(/\x._x1(x)))]] = x0 + F1(0) >= F1(0) = [[_x1(~c1)]] [[or#(forall(/\x._x0(x)), _x1)]] = x1 + F0(0) >= x1 + F0(0) = [[or#(_x0(~c2), _x1)]] [[or#(forall(/\x._x0(x)), _x1)]] = x1 + F0(0) >= F0(0) = [[_x0(~c3)]] [[not#(forall(/\x._x0(x)))]] = 2 + F0(0) >= 2 + F0(0) = [[not#(_x0(~c4))]] [[not#(forall(/\x._x0(x)))]] = 2 + F0(0) > F0(0) = [[_x0(~c5)]] [[or#(_x0, exists(/\x._x1(x)))]] = x0 + F1(0) >= x0 + F1(0) = [[or#(_x0, _x1(~c6))]] [[or#(_x0, exists(/\x._x1(x)))]] = x0 + F1(0) >= F1(0) = [[_x1(~c7)]] [[or#(exists(/\x._x0(x)), _x1)]] = x1 + F0(0) >= x1 + F0(0) = [[or#(_x0(~c8), _x1)]] [[or#(exists(/\x._x0(x)), _x1)]] = x1 + F0(0) >= F0(0) = [[_x0(~c9)]] [[not#(exists(/\x._x0(x)))]] = 2 + F0(0) >= 2 + F0(0) = [[not#(_x0(~c10))]] [[not#(exists(/\x._x0(x)))]] = 2 + F0(0) > F0(0) = [[_x0(~c11)]] [[and(_x0, forall(/\x._x1(x)))]] = x0 + F1(0) >= x0 + F1(0) = [[forall(/\x.and-(_x0, _x1(x)))]] [[or(_x0, forall(/\x._x1(x)))]] = 2x0 + F1(0) >= 2x0 + F1(0) = [[forall(/\x.or-(_x0, _x1(x)))]] [[and(forall(/\x._x0(x)), _x1)]] = x1 + F0(0) >= x1 + F0(0) = [[forall(/\x.and-(_x0(x), _x1))]] [[or(forall(/\x._x0(x)), _x1)]] = x1 + 2F0(0) >= x1 + 2F0(0) = [[forall(/\x.or-(_x0(x), _x1))]] [[not(forall(/\x._x0(x)))]] = 2 + 2F0(0) >= 2 + 2F0(0) = [[exists(/\x.not-(_x0(x)))]] [[and(_x0, exists(/\x._x1(x)))]] = x0 + F1(0) >= x0 + F1(0) = [[exists(/\x.and-(_x0, _x1(x)))]] [[or(_x0, exists(/\x._x1(x)))]] = 2x0 + F1(0) >= 2x0 + F1(0) = [[exists(/\x.or-(_x0, _x1(x)))]] [[and(exists(/\x._x0(x)), _x1)]] = x1 + F0(0) >= x1 + F0(0) = [[exists(/\x.and-(_x0(x), _x1))]] [[or(exists(/\x._x0(x)), _x1)]] = x1 + 2F0(0) >= x1 + 2F0(0) = [[exists(/\x.or-(_x0(x), _x1))]] [[not(exists(/\x._x0(x)))]] = 2 + 2F0(0) >= 2 + 2F0(0) = [[forall(/\x.not-(_x0(x)))]] [[and-(_x0, _x1)]] = x0 + x1 >= x0 + x1 = [[and(_x0, _x1)]] [[not-(_x0)]] = 2 + 2x0 >= 2 + 2x0 = [[not(_x0)]] [[not-(_x0)]] = 2 + 2x0 >= 2 + x0 = [[not#(_x0)]] [[or-(_x0, _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[or(_x0, _x1)]] [[or-(_x0, _x1)]] = x1 + 2x0 >= x0 + x1 = [[or#(_x0, _x1)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_3, R_0, minimal, formative) by (P_4, R_0, minimal, formative), where P_4 consists of: or#(X, forall(/\x.Y(x))) =#> or#(X, Y(y)) or#(X, forall(/\x.Y(x))) =#> Y(y) or#(forall(/\x.X(x)), Y) =#> or#(X(y), Y) or#(forall(/\x.X(x)), Y) =#> X(y) not#(forall(/\x.X(x))) =#> not#(X(y)) or#(X, exists(/\x.Y(x))) =#> or#(X, Y(y)) or#(X, exists(/\x.Y(x))) =#> Y(y) or#(exists(/\x.X(x)), Y) =#> or#(X(y), Y) or#(exists(/\x.X(x)), Y) =#> X(y) not#(exists(/\x.X(x))) =#> not#(X(y)) Thus, the original system is terminating if each of (P_2, R_0, minimal, formative) and (P_4, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_4, R_0, minimal, formative). We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: * 0 : 0, 1, 2, 3, 5, 6, 7, 8 * 1 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 * 2 : 0, 1, 2, 3, 5, 6, 7, 8 * 3 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 * 4 : 4, 9 * 5 : 0, 1, 2, 3, 5, 6, 7, 8 * 6 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 * 7 : 0, 1, 2, 3, 5, 6, 7, 8 * 8 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 * 9 : 4, 9 This graph has the following strongly connected components: P_5: or#(X, forall(/\x.Y(x))) =#> or#(X, Y(y)) or#(X, forall(/\x.Y(x))) =#> Y(y) or#(forall(/\x.X(x)), Y) =#> or#(X(y), Y) or#(forall(/\x.X(x)), Y) =#> X(y) or#(X, exists(/\x.Y(x))) =#> or#(X, Y(y)) or#(X, exists(/\x.Y(x))) =#> Y(y) or#(exists(/\x.X(x)), Y) =#> or#(X(y), Y) or#(exists(/\x.X(x)), Y) =#> X(y) P_6: not#(forall(/\x.X(x))) =#> not#(X(y)) not#(exists(/\x.X(x))) =#> not#(X(y)) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_4, R_0, m, f) by (P_5, R_0, m, f) and (P_6, R_0, m, f). Thus, the original system is terminating if each of (P_2, R_0, minimal, formative), (P_5, R_0, minimal, formative) and (P_6, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_6, R_0, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. (P_6, R_0) has no usable rules. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: not#(forall(/\x.X(x))) >? not#(X(~c0)) not#(exists(/\x.X(x))) >? not#(X(~c1)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: exists = \G0.3 + G0(0) forall = \G0.3 + G0(0) not# = \y0.y0 ~c0 = 0 ~c1 = 0 Using this interpretation, the requirements translate to: [[not#(forall(/\x._x0(x)))]] = 3 + F0(0) > F0(0) = [[not#(_x0(~c0))]] [[not#(exists(/\x._x0(x)))]] = 3 + F0(0) > F0(0) = [[not#(_x0(~c1))]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_6, R_0) by ({}, R_0). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if each of (P_2, R_0, minimal, formative) and (P_5, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_5, R_0, minimal, formative). We will use the reduction pair processor [Kop12, Thm. 7.16]. As the system is abstraction-simple and the formative flag is set, it suffices to find a tagged reduction pair [Kop12, Def. 6.70]. Thus, we must orient: or#(X, forall(/\x.Y(x))) >? or#(X, Y(~c0)) or#(X, forall(/\x.Y(x))) >? Y(~c1) or#(forall(/\x.X(x)), Y) >? or#(X(~c2), Y) or#(forall(/\x.X(x)), Y) >? X(~c3) or#(X, exists(/\x.Y(x))) >? or#(X, Y(~c4)) or#(X, exists(/\x.Y(x))) >? Y(~c5) or#(exists(/\x.X(x)), Y) >? or#(X(~c6), Y) or#(exists(/\x.X(x)), Y) >? X(~c7) and(X, forall(/\x.Y(x))) >= forall(/\y.and-(X, Y(y))) or(X, forall(/\x.Y(x))) >= forall(/\y.or-(X, Y(y))) and(forall(/\x.X(x)), Y) >= forall(/\y.and-(X(y), Y)) or(forall(/\x.X(x)), Y) >= forall(/\y.or-(X(y), Y)) not(forall(/\x.X(x))) >= exists(/\y.not-(X(y))) and(X, exists(/\x.Y(x))) >= exists(/\y.and-(X, Y(y))) or(X, exists(/\x.Y(x))) >= exists(/\y.or-(X, Y(y))) and(exists(/\x.X(x)), Y) >= exists(/\y.and-(X(y), Y)) or(exists(/\x.X(x)), Y) >= exists(/\y.or-(X(y), Y)) not(exists(/\x.X(x))) >= forall(/\y.not-(X(y))) and-(X, Y) >= and(X, Y) not-(X) >= not(X) or-(X, Y) >= or(X, Y) or-(X, Y) >= or#(X, Y) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: and = \y0y1.y0 + y1 and- = \y0y1.y0 + y1 exists = \G0.G0(0) forall = \G0.G0(0) not = \y0.y0 not- = \y0.y0 or = \y0y1.1 + y0 + 2y1 or- = \y0y1.1 + y0 + 2y1 or# = \y0y1.1 + y0 + y1 ~c0 = 0 ~c1 = 0 ~c2 = 0 ~c3 = 0 ~c4 = 0 ~c5 = 0 ~c6 = 0 ~c7 = 0 Using this interpretation, the requirements translate to: [[or#(_x0, forall(/\x._x1(x)))]] = 1 + x0 + F1(0) >= 1 + x0 + F1(0) = [[or#(_x0, _x1(~c0))]] [[or#(_x0, forall(/\x._x1(x)))]] = 1 + x0 + F1(0) > F1(0) = [[_x1(~c1)]] [[or#(forall(/\x._x0(x)), _x1)]] = 1 + x1 + F0(0) >= 1 + x1 + F0(0) = [[or#(_x0(~c2), _x1)]] [[or#(forall(/\x._x0(x)), _x1)]] = 1 + x1 + F0(0) > F0(0) = [[_x0(~c3)]] [[or#(_x0, exists(/\x._x1(x)))]] = 1 + x0 + F1(0) >= 1 + x0 + F1(0) = [[or#(_x0, _x1(~c4))]] [[or#(_x0, exists(/\x._x1(x)))]] = 1 + x0 + F1(0) > F1(0) = [[_x1(~c5)]] [[or#(exists(/\x._x0(x)), _x1)]] = 1 + x1 + F0(0) >= 1 + x1 + F0(0) = [[or#(_x0(~c6), _x1)]] [[or#(exists(/\x._x0(x)), _x1)]] = 1 + x1 + F0(0) > F0(0) = [[_x0(~c7)]] [[and(_x0, forall(/\x._x1(x)))]] = x0 + F1(0) >= x0 + F1(0) = [[forall(/\x.and-(_x0, _x1(x)))]] [[or(_x0, forall(/\x._x1(x)))]] = 1 + x0 + 2F1(0) >= 1 + x0 + 2F1(0) = [[forall(/\x.or-(_x0, _x1(x)))]] [[and(forall(/\x._x0(x)), _x1)]] = x1 + F0(0) >= x1 + F0(0) = [[forall(/\x.and-(_x0(x), _x1))]] [[or(forall(/\x._x0(x)), _x1)]] = 1 + 2x1 + F0(0) >= 1 + 2x1 + F0(0) = [[forall(/\x.or-(_x0(x), _x1))]] [[not(forall(/\x._x0(x)))]] = F0(0) >= F0(0) = [[exists(/\x.not-(_x0(x)))]] [[and(_x0, exists(/\x._x1(x)))]] = x0 + F1(0) >= x0 + F1(0) = [[exists(/\x.and-(_x0, _x1(x)))]] [[or(_x0, exists(/\x._x1(x)))]] = 1 + x0 + 2F1(0) >= 1 + x0 + 2F1(0) = [[exists(/\x.or-(_x0, _x1(x)))]] [[and(exists(/\x._x0(x)), _x1)]] = x1 + F0(0) >= x1 + F0(0) = [[exists(/\x.and-(_x0(x), _x1))]] [[or(exists(/\x._x0(x)), _x1)]] = 1 + 2x1 + F0(0) >= 1 + 2x1 + F0(0) = [[exists(/\x.or-(_x0(x), _x1))]] [[not(exists(/\x._x0(x)))]] = F0(0) >= F0(0) = [[forall(/\x.not-(_x0(x)))]] [[and-(_x0, _x1)]] = x0 + x1 >= x0 + x1 = [[and(_x0, _x1)]] [[not-(_x0)]] = x0 >= x0 = [[not(_x0)]] [[or-(_x0, _x1)]] = 1 + x0 + 2x1 >= 1 + x0 + 2x1 = [[or(_x0, _x1)]] [[or-(_x0, _x1)]] = 1 + x0 + 2x1 >= 1 + x0 + x1 = [[or#(_x0, _x1)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_5, R_0, minimal, formative) by (P_7, R_0, minimal, formative), where P_7 consists of: or#(X, forall(/\x.Y(x))) =#> or#(X, Y(y)) or#(forall(/\x.X(x)), Y) =#> or#(X(y), Y) or#(X, exists(/\x.Y(x))) =#> or#(X, Y(y)) or#(exists(/\x.X(x)), Y) =#> or#(X(y), Y) Thus, the original system is terminating if each of (P_2, R_0, minimal, formative) and (P_7, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_7, R_0, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. (P_7, R_0) has no usable rules. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: or#(X, forall(/\x.Y(x))) >? or#(X, Y(~c0)) or#(forall(/\x.X(x)), Y) >? or#(X(~c1), Y) or#(X, exists(/\x.Y(x))) >? or#(X, Y(~c2)) or#(exists(/\x.X(x)), Y) >? or#(X(~c3), Y) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: exists = \G0.3 + G0(0) forall = \G0.3 + 2G0(0) or# = \y0y1.y1 ~c0 = 0 ~c1 = 0 ~c2 = 0 ~c3 = 0 Using this interpretation, the requirements translate to: [[or#(_x0, forall(/\x._x1(x)))]] = 3 + 2F1(0) > F1(0) = [[or#(_x0, _x1(~c0))]] [[or#(forall(/\x._x0(x)), _x1)]] = x1 >= x1 = [[or#(_x0(~c1), _x1)]] [[or#(_x0, exists(/\x._x1(x)))]] = 3 + F1(0) > F1(0) = [[or#(_x0, _x1(~c2))]] [[or#(exists(/\x._x0(x)), _x1)]] = x1 >= x1 = [[or#(_x0(~c3), _x1)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_7, R_0, minimal, formative) by (P_8, R_0, minimal, formative), where P_8 consists of: or#(forall(/\x.X(x)), Y) =#> or#(X(y), Y) or#(exists(/\x.X(x)), Y) =#> or#(X(y), Y) Thus, the original system is terminating if each of (P_2, R_0, minimal, formative) and (P_8, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_8, R_0, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. (P_8, R_0) has no usable rules. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: or#(forall(/\x.X(x)), Y) >? or#(X(~c0), Y) or#(exists(/\x.X(x)), Y) >? or#(X(~c1), Y) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: exists = \G0.3 + G0(0) forall = \G0.3 + G0(0) or# = \y0y1.y0 ~c0 = 0 ~c1 = 0 Using this interpretation, the requirements translate to: [[or#(forall(/\x._x0(x)), _x1)]] = 3 + F0(0) > F0(0) = [[or#(_x0(~c0), _x1)]] [[or#(exists(/\x._x0(x)), _x1)]] = 3 + F0(0) > F0(0) = [[or#(_x0(~c1), _x1)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_8, R_0) by ({}, R_0). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if (P_2, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_2, R_0, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. (P_2, R_0) has no usable rules. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: and#(X, forall(/\x.Y(x))) >? and#(X, Y(~c0)) and#(forall(/\x.X(x)), Y) >? and#(X(~c1), Y) and#(X, exists(/\x.Y(x))) >? and#(X, Y(~c2)) and#(exists(/\x.X(x)), Y) >? and#(X(~c3), Y) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: and# = \y0y1.y1 exists = \G0.3 + G0(0) forall = \G0.3 + 2G0(0) ~c0 = 0 ~c1 = 0 ~c2 = 0 ~c3 = 0 Using this interpretation, the requirements translate to: [[and#(_x0, forall(/\x._x1(x)))]] = 3 + 2F1(0) > F1(0) = [[and#(_x0, _x1(~c0))]] [[and#(forall(/\x._x0(x)), _x1)]] = x1 >= x1 = [[and#(_x0(~c1), _x1)]] [[and#(_x0, exists(/\x._x1(x)))]] = 3 + F1(0) > F1(0) = [[and#(_x0, _x1(~c2))]] [[and#(exists(/\x._x0(x)), _x1)]] = x1 >= x1 = [[and#(_x0(~c3), _x1)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_2, R_0, minimal, formative) by (P_9, R_0, minimal, formative), where P_9 consists of: and#(forall(/\x.X(x)), Y) =#> and#(X(y), Y) and#(exists(/\x.X(x)), Y) =#> and#(X(y), Y) Thus, the original system is terminating if (P_9, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_9, R_0, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. (P_9, R_0) has no usable rules. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: and#(forall(/\x.X(x)), Y) >? and#(X(~c0), Y) and#(exists(/\x.X(x)), Y) >? and#(X(~c1), Y) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: and# = \y0y1.y0 exists = \G0.3 + G0(0) forall = \G0.3 + G0(0) ~c0 = 0 ~c1 = 0 Using this interpretation, the requirements translate to: [[and#(forall(/\x._x0(x)), _x1)]] = 3 + F0(0) > F0(0) = [[and#(_x0(~c0), _x1)]] [[and#(exists(/\x._x0(x)), _x1)]] = 3 + F0(0) > F0(0) = [[and#(_x0(~c1), _x1)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_9, R_0) by ({}, R_0). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. As all dependency pair problems were succesfully simplified with sound (and complete) processors until nothing remained, we conclude termination. +++ Citations +++ [Kop11] C. Kop. Simplifying Algebraic Functional Systems. In Proceedings of CAI 2011, volume 6742 of LNCS. 201--215, Springer, 2011. [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012.