0.00/0.26 YES 0.00/0.28 We consider the system theBenchmark. 0.00/0.28 0.00/0.28 Alphabet: 0.00/0.28 0.00/0.28 0 : [] --> nat 0.00/0.28 add : [nat] --> nat -> nat 0.00/0.28 eq : [nat] --> nat -> bool 0.00/0.28 err : [] --> nat 0.00/0.28 false : [] --> bool 0.00/0.28 id : [] --> nat -> nat 0.00/0.28 nul : [] --> nat -> bool 0.00/0.28 pred : [nat] --> nat 0.00/0.28 s : [nat] --> nat 0.00/0.28 true : [] --> bool 0.00/0.28 0.00/0.28 Rules: 0.00/0.28 0.00/0.28 nul 0 => true 0.00/0.28 nul s(x) => false 0.00/0.28 nul err => false 0.00/0.28 pred(0) => err 0.00/0.28 pred(s(x)) => x 0.00/0.28 id x => x 0.00/0.28 eq(0) => nul 0.00/0.28 eq(s(x)) => /\y.eq(x) pred(y) 0.00/0.28 add(0) => id 0.00/0.28 add(s(x)) => /\y.add(x) s(y) 0.00/0.28 0.00/0.28 This AFS is converted to an AFSM simply by replacing all free variables by meta-variables (with arity 0). 0.00/0.28 0.00/0.28 We use rule removal, following [Kop12, Theorem 2.23]. 0.00/0.28 0.00/0.28 This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 0.00/0.28 0.00/0.28 nul 0 >? true 0.00/0.28 nul s(X) >? false 0.00/0.28 nul err >? false 0.00/0.28 pred(0) >? err 0.00/0.28 pred(s(X)) >? X 0.00/0.28 id X >? X 0.00/0.28 eq(0) >? nul 0.00/0.28 eq(s(X)) >? /\x.eq(X) pred(x) 0.00/0.28 add(0) >? id 0.00/0.28 add(s(X)) >? /\x.add(X) s(x) 0.00/0.28 0.00/0.28 We use a recursive path ordering as defined in [Kop12, Chapter 5]. 0.00/0.28 0.00/0.28 Argument functions: 0.00/0.28 0.00/0.28 [[false]] = _|_ 0.00/0.28 [[id]] = _|_ 0.00/0.28 [[nul]] = _|_ 0.00/0.28 [[true]] = _|_ 0.00/0.28 0.00/0.28 We choose Lex = {} and Mul = {0, @_{o -> o}, add, eq, err, pred, s}, and the following precedence: add > 0 > s > eq > pred > @_{o -> o} > err 0.00/0.28 0.00/0.28 Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: 0.00/0.28 0.00/0.28 @_{o -> o}(_|_, 0) >= _|_ 0.00/0.28 @_{o -> o}(_|_, s(X)) >= _|_ 0.00/0.28 @_{o -> o}(_|_, err) >= _|_ 0.00/0.28 pred(0) >= err 0.00/0.28 pred(s(X)) > X 0.00/0.28 @_{o -> o}(_|_, X) >= X 0.00/0.28 eq(0) >= _|_ 0.00/0.28 eq(s(X)) >= /\x.@_{o -> o}(eq(X), pred(x)) 0.00/0.28 add(0) >= _|_ 0.00/0.28 add(s(X)) >= /\x.@_{o -> o}(add(X), s(x)) 0.00/0.28 0.00/0.28 With these choices, we have: 0.00/0.28 0.00/0.28 1] @_{o -> o}(_|_, 0) >= _|_ by (Bot) 0.00/0.28 0.00/0.28 2] @_{o -> o}(_|_, s(X)) >= _|_ by (Bot) 0.00/0.28 0.00/0.28 3] @_{o -> o}(_|_, err) >= _|_ by (Bot) 0.00/0.28 0.00/0.28 4] pred(0) >= err because [5], by (Star) 0.00/0.28 5] pred*(0) >= err because pred > err, by (Copy) 0.00/0.28 0.00/0.28 6] pred(s(X)) > X because [7], by definition 0.00/0.28 7] pred*(s(X)) >= X because [8], by (Select) 0.00/0.28 8] s(X) >= X because [9], by (Star) 0.00/0.28 9] s*(X) >= X because [10], by (Select) 0.00/0.28 10] X >= X by (Meta) 0.00/0.28 0.00/0.28 11] @_{o -> o}(_|_, X) >= X because [12], by (Star) 0.00/0.28 12] @_{o -> o}*(_|_, X) >= X because [13], by (Select) 0.00/0.28 13] X >= X by (Meta) 0.00/0.28 0.00/0.28 14] eq(0) >= _|_ by (Bot) 0.00/0.28 0.00/0.28 15] eq(s(X)) >= /\x.@_{o -> o}(eq(X), pred(x)) because [16], by (Star) 0.00/0.28 16] eq*(s(X)) >= /\y.@_{o -> o}(eq(X), pred(y)) because [17], by (F-Abs) 0.00/0.28 17] eq*(s(X), x) >= @_{o -> o}(eq(X), pred(x)) because eq > @_{o -> o}, [18] and [22], by (Copy) 0.00/0.28 18] eq*(s(X), x) >= eq(X) because eq in Mul and [19], by (Stat) 0.00/0.28 19] s(X) > X because [20], by definition 0.00/0.28 20] s*(X) >= X because [21], by (Select) 0.00/0.28 21] X >= X by (Meta) 0.00/0.28 22] eq*(s(X), x) >= pred(x) because eq > pred and [23], by (Copy) 0.00/0.28 23] eq*(s(X), x) >= x because [24], by (Select) 0.00/0.28 24] x >= x by (Var) 0.00/0.28 0.00/0.28 25] add(0) >= _|_ by (Bot) 0.00/0.28 0.00/0.28 26] add(s(X)) >= /\x.@_{o -> o}(add(X), s(x)) because [27], by (Star) 0.00/0.28 27] add*(s(X)) >= /\y.@_{o -> o}(add(X), s(y)) because [28], by (F-Abs) 0.00/0.28 28] add*(s(X), x) >= @_{o -> o}(add(X), s(x)) because add > @_{o -> o}, [29] and [33], by (Copy) 0.00/0.28 29] add*(s(X), x) >= add(X) because add in Mul and [30], by (Stat) 0.00/0.28 30] s(X) > X because [31], by definition 0.00/0.28 31] s*(X) >= X because [32], by (Select) 0.00/0.28 32] X >= X by (Meta) 0.00/0.28 33] add*(s(X), x) >= s(x) because add > s and [34], by (Copy) 0.00/0.28 34] add*(s(X), x) >= x because [35], by (Select) 0.00/0.28 35] x >= x by (Var) 0.00/0.28 0.00/0.28 We can thus remove the following rules: 0.00/0.28 0.00/0.28 pred(s(X)) => X 0.00/0.28 0.00/0.28 We use rule removal, following [Kop12, Theorem 2.23]. 0.00/0.28 0.00/0.28 This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 0.00/0.28 0.00/0.28 nul 0 >? true 0.00/0.28 nul s(X) >? false 0.00/0.28 nul err >? false 0.00/0.28 pred(0) >? err 0.00/0.28 id X >? X 0.00/0.28 eq(0) >? nul 0.00/0.28 eq(s(X)) >? /\x.eq(X) pred(x) 0.00/0.28 add(0) >? id 0.00/0.28 add(s(X)) >? /\x.add(X) s(x) 0.00/0.28 0.00/0.28 We use a recursive path ordering as defined in [Kop12, Chapter 5]. 0.00/0.28 0.00/0.28 Argument functions: 0.00/0.28 0.00/0.28 [[err]] = _|_ 0.00/0.28 [[false]] = _|_ 0.00/0.28 [[id]] = _|_ 0.00/0.28 [[nul]] = _|_ 0.00/0.28 [[true]] = _|_ 0.00/0.28 0.00/0.28 We choose Lex = {} and Mul = {0, @_{o -> o}, add, eq, pred, s}, and the following precedence: 0 > eq > pred > add > @_{o -> o} > s 0.00/0.28 0.00/0.28 Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: 0.00/0.28 0.00/0.28 @_{o -> o}(_|_, 0) >= _|_ 0.00/0.28 @_{o -> o}(_|_, s(X)) >= _|_ 0.00/0.28 @_{o -> o}(_|_, _|_) >= _|_ 0.00/0.28 pred(0) >= _|_ 0.00/0.28 @_{o -> o}(_|_, X) >= X 0.00/0.28 eq(0) >= _|_ 0.00/0.28 eq(s(X)) > /\x.@_{o -> o}(eq(X), pred(x)) 0.00/0.28 add(0) >= _|_ 0.00/0.28 add(s(X)) > /\x.@_{o -> o}(add(X), s(x)) 0.00/0.28 0.00/0.28 With these choices, we have: 0.00/0.28 0.00/0.28 1] @_{o -> o}(_|_, 0) >= _|_ by (Bot) 0.00/0.28 0.00/0.28 2] @_{o -> o}(_|_, s(X)) >= _|_ by (Bot) 0.00/0.28 0.00/0.28 3] @_{o -> o}(_|_, _|_) >= _|_ by (Bot) 0.00/0.28 0.00/0.28 4] pred(0) >= _|_ by (Bot) 0.00/0.28 0.00/0.28 5] @_{o -> o}(_|_, X) >= X because [6], by (Star) 0.00/0.28 6] @_{o -> o}*(_|_, X) >= X because [7], by (Select) 0.00/0.28 7] X >= X by (Meta) 0.00/0.28 0.00/0.28 8] eq(0) >= _|_ by (Bot) 0.00/0.28 0.00/0.28 9] eq(s(X)) > /\x.@_{o -> o}(eq(X), pred(x)) because [10], by definition 0.00/0.28 10] eq*(s(X)) >= /\y.@_{o -> o}(eq(X), pred(y)) because [11], by (F-Abs) 0.00/0.28 11] eq*(s(X), x) >= @_{o -> o}(eq(X), pred(x)) because eq > @_{o -> o}, [12] and [16], by (Copy) 0.00/0.28 12] eq*(s(X), x) >= eq(X) because eq in Mul and [13], by (Stat) 0.00/0.28 13] s(X) > X because [14], by definition 0.00/0.28 14] s*(X) >= X because [15], by (Select) 0.00/0.28 15] X >= X by (Meta) 0.00/0.28 16] eq*(s(X), x) >= pred(x) because eq > pred and [17], by (Copy) 0.00/0.28 17] eq*(s(X), x) >= x because [18], by (Select) 0.00/0.28 18] x >= x by (Var) 0.00/0.28 0.00/0.28 19] add(0) >= _|_ by (Bot) 0.00/0.28 0.00/0.28 20] add(s(X)) > /\x.@_{o -> o}(add(X), s(x)) because [21], by definition 0.00/0.28 21] add*(s(X)) >= /\y.@_{o -> o}(add(X), s(y)) because [22], by (F-Abs) 0.00/0.28 22] add*(s(X), x) >= @_{o -> o}(add(X), s(x)) because add > @_{o -> o}, [23] and [27], by (Copy) 0.00/0.28 23] add*(s(X), x) >= add(X) because add in Mul and [24], by (Stat) 0.00/0.28 24] s(X) > X because [25], by definition 0.00/0.28 25] s*(X) >= X because [26], by (Select) 0.00/0.28 26] X >= X by (Meta) 0.00/0.28 27] add*(s(X), x) >= s(x) because add > s and [28], by (Copy) 0.00/0.28 28] add*(s(X), x) >= x because [29], by (Select) 0.00/0.28 29] x >= x by (Var) 0.00/0.28 0.00/0.28 We can thus remove the following rules: 0.00/0.28 0.00/0.28 eq(s(X)) => /\x.eq(X) pred(x) 0.00/0.28 add(s(X)) => /\x.add(X) s(x) 0.00/0.28 0.00/0.28 We use rule removal, following [Kop12, Theorem 2.23]. 0.00/0.28 0.00/0.28 This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 0.00/0.28 0.00/0.28 nul 0 >? true 0.00/0.28 nul s(X) >? false 0.00/0.28 nul err >? false 0.00/0.28 pred(0) >? err 0.00/0.28 id X >? X 0.00/0.28 eq(0) >? nul 0.00/0.28 add(0) >? id 0.00/0.28 0.00/0.28 We orient these requirements with a polynomial interpretation in the natural numbers. 0.00/0.28 0.00/0.28 The following interpretation satisfies the requirements: 0.00/0.28 0.00/0.28 0 = 3 0.00/0.28 add = \y0y1.3 + 3y0 + 3y1 0.00/0.28 eq = \y0y1.3 + 3y0 + 3y1 0.00/0.28 err = 0 0.00/0.28 false = 0 0.00/0.28 id = \y0.3y0 0.00/0.28 nul = \y0.3y0 0.00/0.28 pred = \y0.3 + 3y0 0.00/0.28 s = \y0.3 + y0 0.00/0.28 true = 0 0.00/0.28 0.00/0.28 Using this interpretation, the requirements translate to: 0.00/0.28 0.00/0.28 [[nul 0]] = 12 > 0 = [[true]] 0.00/0.28 [[nul s(_x0)]] = 12 + 4x0 > 0 = [[false]] 0.00/0.28 [[nul err]] = 0 >= 0 = [[false]] 0.00/0.28 [[pred(0)]] = 12 > 0 = [[err]] 0.00/0.28 [[id _x0]] = 4x0 >= x0 = [[_x0]] 0.00/0.28 [[eq(0)]] = \y0.12 + 3y0 > \y0.3y0 = [[nul]] 0.00/0.28 [[add(0)]] = \y0.12 + 3y0 > \y0.3y0 = [[id]] 0.00/0.28 0.00/0.28 We can thus remove the following rules: 0.00/0.28 0.00/0.28 nul 0 => true 0.00/0.28 nul s(X) => false 0.00/0.28 pred(0) => err 0.00/0.28 eq(0) => nul 0.00/0.28 add(0) => id 0.00/0.28 0.00/0.28 We use rule removal, following [Kop12, Theorem 2.23]. 0.00/0.28 0.00/0.28 This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 0.00/0.28 0.00/0.28 nul(err) >? false 0.00/0.28 id(X) >? X 0.00/0.28 0.00/0.28 We orient these requirements with a polynomial interpretation in the natural numbers. 0.00/0.28 0.00/0.28 The following interpretation satisfies the requirements: 0.00/0.28 0.00/0.28 err = 3 0.00/0.28 false = 0 0.00/0.28 id = \y0.3 + y0 0.00/0.28 nul = \y0.3 + 3y0 0.00/0.28 0.00/0.28 Using this interpretation, the requirements translate to: 0.00/0.28 0.00/0.28 [[nul(err)]] = 12 > 0 = [[false]] 0.00/0.28 [[id(_x0)]] = 3 + x0 > x0 = [[_x0]] 0.00/0.28 0.00/0.28 We can thus remove the following rules: 0.00/0.28 0.00/0.28 nul(err) => false 0.00/0.28 id(X) => X 0.00/0.28 0.00/0.28 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.00/0.28 0.00/0.28 0.00/0.28 +++ Citations +++ 0.00/0.28 0.00/0.28 [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. 0.00/0.28 EOF