/export/starexec/sandbox/solver/bin/starexec_run_HigherOrder /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES We consider the system theBenchmark. Alphabet: casea : [u * a -> a * b -> a] --> a caseb : [u * a -> b * b -> b] --> b caseu : [u * a -> u * b -> u] --> u inl : [a] --> u inr : [b] --> u Rules: casea(inl(x), f, g) => f x casea(inr(x), f, g) => g x casea(x, /\y.f inl(y), /\z.f inr(z)) => f x caseb(inl(x), f, g) => f x caseb(inr(x), f, g) => g x caseb(x, /\y.f inl(y), /\z.f inr(z)) => f x caseu(inl(x), f, g) => f x caseu(inr(x), f, g) => g x caseu(x, /\y.f inl(y), /\z.f inr(z)) => f x 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: casea : [u * a -> a * b -> a] --> a caseb : [u * a -> b * b -> b] --> b caseu : [u * a -> u * b -> u] --> u inl : [a] --> u inr : [b] --> u ~AP1 : [u -> a * u] --> a ~AP2 : [u -> b * u] --> b ~AP3 : [u -> u * u] --> u Rules: casea(inl(X), F, G) => F X casea(inr(X), F, G) => G X casea(X, /\x.~AP1(F, inl(x)), /\y.~AP1(F, inr(y))) => ~AP1(F, X) caseb(inl(X), F, G) => F X caseb(inr(X), F, G) => G X caseb(X, /\x.~AP2(F, inl(x)), /\y.~AP2(F, inr(y))) => ~AP2(F, X) caseu(inl(X), F, G) => F X caseu(inr(X), F, G) => G X caseu(X, /\x.~AP3(F, inl(x)), /\y.~AP3(F, inr(y))) => ~AP3(F, X) ~AP1(F, X) => F X ~AP2(F, X) => F X ~AP3(F, X) => F X We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): casea(inl(X), F, G) >? F X casea(inr(X), F, G) >? G X casea(X, /\x.~AP1(F, inl(x)), /\y.~AP1(F, inr(y))) >? ~AP1(F, X) caseb(inl(X), F, G) >? F X caseb(inr(X), F, G) >? G X caseb(X, /\x.~AP2(F, inl(x)), /\y.~AP2(F, inr(y))) >? ~AP2(F, X) caseu(inl(X), F, G) >? F X caseu(inr(X), F, G) >? G X caseu(X, /\x.~AP3(F, inl(x)), /\y.~AP3(F, inr(y))) >? ~AP3(F, X) ~AP1(F, X) >? F X ~AP2(F, X) >? F X ~AP3(F, X) >? F X We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: casea = \y0G1G2.3 + 3y0 + G1(y0) + G2(y0) + 2y0G2(y0) caseb = \y0G1G2.3 + 3y0 + 3G1(y0) + 3G2(0) + 3G2(y0) + y0G2(y0) caseu = \y0G1G2.3 + 3y0 + 3y0G1(y0) + 3G1(0) + 3G1(y0) + 3G2(0) + 3G2(y0) inl = \y0.3 + 3y0 inr = \y0.3 + 3y0 ~AP1 = \G0y1.2 + y1 + 2G0(y1) ~AP2 = \G0y1.2y1 + 3G0(0) + 3G0(y1) + y1G0(y1) ~AP3 = \G0y1.2y1 + 2y1G0(y1) + 3G0(0) + 3G0(y1) Using this interpretation, the requirements translate to: [[casea(inl(_x0), _F1, _F2)]] = 12 + 9x0 + F1(3 + 3x0) + 6x0F2(3 + 3x0) + 7F2(3 + 3x0) > x0 + F1(x0) = [[_F1 _x0]] [[casea(inr(_x0), _F1, _F2)]] = 12 + 9x0 + F1(3 + 3x0) + 6x0F2(3 + 3x0) + 7F2(3 + 3x0) > x0 + F2(x0) = [[_F2 _x0]] [[casea(_x0, /\x.~AP1(_F1, inl(x)), /\y.~AP1(_F1, inr(y)))]] = 13 + 6x0x0 + 19x0 + 4x0F1(3 + 3x0) + 4F1(3 + 3x0) > 2 + x0 + 2F1(x0) = [[~AP1(_F1, _x0)]] [[caseb(inl(_x0), _F1, _F2)]] = 12 + 9x0 + 3x0F2(3 + 3x0) + 3F1(3 + 3x0) + 3F2(0) + 6F2(3 + 3x0) > x0 + F1(x0) = [[_F1 _x0]] [[caseb(inr(_x0), _F1, _F2)]] = 12 + 9x0 + 3x0F2(3 + 3x0) + 3F1(3 + 3x0) + 3F2(0) + 6F2(3 + 3x0) > x0 + F2(x0) = [[_F2 _x0]] [[caseb(_x0, /\x.~AP2(_F1, inl(x)), /\y.~AP2(_F1, inr(y)))]] = 57 + 6x0x0 + 45x0 + 3x0x0F1(3 + 3x0) + 3x0F1(0) + 18F1(3) + 24x0F1(3 + 3x0) + 27F1(0) + 36F1(3 + 3x0) > 2x0 + 3F1(0) + 3F1(x0) + x0F1(x0) = [[~AP2(_F1, _x0)]] [[caseu(inl(_x0), _F1, _F2)]] = 12 + 9x0 + 3F1(0) + 3F2(0) + 3F2(3 + 3x0) + 9x0F1(3 + 3x0) + 12F1(3 + 3x0) > x0 + F1(x0) = [[_F1 _x0]] [[caseu(inr(_x0), _F1, _F2)]] = 12 + 9x0 + 3F1(0) + 3F2(0) + 3F2(3 + 3x0) + 9x0F1(3 + 3x0) + 12F1(3 + 3x0) > x0 + F2(x0) = [[_F2 _x0]] [[caseu(_x0, /\x.~AP3(_F1, inl(x)), /\y.~AP3(_F1, inr(y)))]] = 75 + 18x0x0 + 57x0 + 9x0F1(0) + 18x0x0F1(3 + 3x0) + 36F1(0) + 54F1(3) + 54F1(3 + 3x0) + 63x0F1(3 + 3x0) > 2x0 + 2x0F1(x0) + 3F1(0) + 3F1(x0) = [[~AP3(_F1, _x0)]] [[~AP1(_F0, _x1)]] = 2 + x1 + 2F0(x1) > x1 + F0(x1) = [[_F0 _x1]] [[~AP2(_F0, _x1)]] = 2x1 + 3F0(0) + 3F0(x1) + x1F0(x1) >= x1 + F0(x1) = [[_F0 _x1]] [[~AP3(_F0, _x1)]] = 2x1 + 2x1F0(x1) + 3F0(0) + 3F0(x1) >= x1 + F0(x1) = [[_F0 _x1]] We can thus remove the following rules: casea(inl(X), F, G) => F X casea(inr(X), F, G) => G X casea(X, /\x.~AP1(F, inl(x)), /\y.~AP1(F, inr(y))) => ~AP1(F, X) caseb(inl(X), F, G) => F X caseb(inr(X), F, G) => G X caseb(X, /\x.~AP2(F, inl(x)), /\y.~AP2(F, inr(y))) => ~AP2(F, X) caseu(inl(X), F, G) => F X caseu(inr(X), F, G) => G X caseu(X, /\x.~AP3(F, inl(x)), /\y.~AP3(F, inr(y))) => ~AP3(F, X) ~AP1(F, X) => F X We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): ~AP2(F, X) >? F X ~AP3(F, X) >? F X We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: ~AP2 = \G0y1.3 + y1 + G0(y1) ~AP3 = \G0y1.3 + y1 + G0(y1) Using this interpretation, the requirements translate to: [[~AP2(_F0, _x1)]] = 3 + x1 + F0(x1) > x1 + F0(x1) = [[_F0 _x1]] [[~AP3(_F0, _x1)]] = 3 + x1 + F0(x1) > x1 + F0(x1) = [[_F0 _x1]] We can thus remove the following rules: ~AP2(F, X) => F X ~AP3(F, X) => F X 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. +++ 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.