We consider the system onearg. Alphabet: 0 : [] --> nat add : [nat] --> nat -> nat eq : [nat] --> nat -> bool err : [] --> nat false : [] --> bool id : [] --> nat -> nat nul : [] --> nat -> bool pred : [nat] --> nat s : [nat] --> nat true : [] --> bool Rules: nul 0 => true nul s(x) => false nul err => false pred(0) => err pred(s(x)) => x id x => x eq(0) => nul eq(s(x)) => /\y.eq(x) pred(y) add(0) => id add(s(x)) => /\y.add(x) s(y) This AFS is converted to an AFSM simply by replacing all free variables by meta-variables (with arity 0). We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): nul 0 >? true nul s(X) >? false nul err >? false pred(0) >? err pred(s(X)) >? X id X >? X eq(0) >? nul eq(s(X)) >? /\x.eq(X) pred(x) add(0) >? id add(s(X)) >? /\x.add(X) s(x) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 3 add = \y0y1.3 + y1 + 3y0 + 3y0y1 eq = \y0y1.3 + y0 + 2y0y1 err = 0 false = 0 id = \y0.0 nul = \y0.0 pred = \y0.2y0 s = \y0.1 + 2y0 true = 0 Using this interpretation, the requirements translate to: [[nul 0]] = 3 > 0 = [[true]] [[nul s(_x0)]] = 1 + 2x0 > 0 = [[false]] [[nul err]] = 0 >= 0 = [[false]] [[pred(0)]] = 6 > 0 = [[err]] [[pred(s(_x0))]] = 2 + 4x0 > x0 = [[_x0]] [[id _x0]] = x0 >= x0 = [[_x0]] [[eq(0)]] = \y0.6 + 6y0 > \y0.0 = [[nul]] [[eq(s(_x0))]] = \y0.4 + 2y0 + 2x0 + 4y0x0 > \y0.3 + x0 + 2y0 + 4x0y0 = [[/\x.eq(_x0) pred(x)]] [[add(0)]] = \y0.12 + 10y0 > \y0.0 = [[id]] [[add(s(_x0))]] = \y0.6 + 4y0 + 6y0x0 + 6x0 > \y0.5 + 4y0 + 6x0 + 6x0y0 = [[/\x.add(_x0) s(x)]] We can thus remove the following rules: nul 0 => true nul s(X) => false pred(0) => err pred(s(X)) => X eq(0) => nul eq(s(X)) => /\x.eq(X) pred(x) add(0) => id add(s(X)) => /\x.add(X) s(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]): nul(err) >? false id(X) >? X We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: err = 3 false = 0 id = \y0.3 + y0 nul = \y0.3 + 3y0 Using this interpretation, the requirements translate to: [[nul(err)]] = 12 > 0 = [[false]] [[id(_x0)]] = 3 + x0 > x0 = [[_x0]] We can thus remove the following rules: nul(err) => false id(X) => 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 +++ [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012.