/export/starexec/sandbox2/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES We consider the system theBenchmark. We are asked to determine termination of the following first-order TRS. !minus : [o * o] --> o !plus : [o * o] --> o 0 : [] --> o 1 : [] --> o BS : [o] --> o I : [o] --> o L : [o] --> o Log : [o] --> o Log!450 : [o] --> o Max : [o] --> o Min : [o] --> o N : [o * o * o] --> o O : [o] --> o Size : [o] --> o Val : [o] --> o WB : [o] --> o and : [o * o] --> o false : [] --> o ge : [o * o] --> o if : [o * o * o] --> o l : [] --> o not : [o] --> o r : [] --> o true : [] --> o O(0) => 0 !plus(0, X) => X !plus(X, 0) => X !plus(O(X), O(Y)) => O(!plus(X, Y)) !plus(O(X), I(Y)) => I(!plus(X, Y)) !plus(I(X), O(Y)) => I(!plus(X, Y)) !plus(I(X), I(Y)) => O(!plus(!plus(X, Y), I(0))) !plus(X, !plus(Y, Z)) => !plus(!plus(X, Y), Z) !minus(X, 0) => X !minus(0, X) => 0 !minus(O(X), O(Y)) => O(!minus(X, Y)) !minus(O(X), I(Y)) => I(!minus(!minus(X, Y), I(1))) !minus(I(X), O(Y)) => I(!minus(X, Y)) !minus(I(X), I(Y)) => O(!minus(X, Y)) not(true) => false not(false) => true and(X, true) => X and(X, false) => false if(true, X, Y) => X if(false, X, Y) => Y ge(O(X), O(Y)) => ge(X, Y) ge(O(X), I(Y)) => not(ge(Y, X)) ge(I(X), O(Y)) => ge(X, Y) ge(I(X), I(Y)) => ge(X, Y) ge(X, 0) => true ge(0, O(X)) => ge(0, X) ge(0, I(X)) => false Log!450(0) => 0 Log!450(I(X)) => !plus(Log!450(X), I(0)) Log!450(O(X)) => if(ge(X, I(0)), !plus(Log!450(X), I(0)), 0) Log(X) => !minus(Log!450(X), I(0)) Val(L(X)) => X Val(N(X, l, r)) => X Min(L(X)) => X Min(N(X, l, r)) => Min(l) Max(L(X)) => X Max(N(X, l, r)) => Max(r) BS(L(X)) => true BS(N(X, l, r)) => and(and(ge(X, Max(l)), ge(Min(r), X)), and(BS(l), BS(r))) Size(L(X)) => I(0) Size(N(X, l, r)) => !plus(!plus(Size(l), Size(r)), I(1)) WB(L(X)) => true WB(N(X, l, r)) => and(if(ge(Size(l), Size(r)), ge(I(0), !minus(Size(l), Size(r))), ge(I(0), !minus(Size(r), Size(l)))), and(WB(l), WB(r))) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): O(0) >? 0 !plus(0, X) >? X !plus(X, 0) >? X !plus(O(X), O(Y)) >? O(!plus(X, Y)) !plus(O(X), I(Y)) >? I(!plus(X, Y)) !plus(I(X), O(Y)) >? I(!plus(X, Y)) !plus(I(X), I(Y)) >? O(!plus(!plus(X, Y), I(0))) !plus(X, !plus(Y, Z)) >? !plus(!plus(X, Y), Z) !minus(X, 0) >? X !minus(0, X) >? 0 !minus(O(X), O(Y)) >? O(!minus(X, Y)) !minus(O(X), I(Y)) >? I(!minus(!minus(X, Y), I(1))) !minus(I(X), O(Y)) >? I(!minus(X, Y)) !minus(I(X), I(Y)) >? O(!minus(X, Y)) not(true) >? false not(false) >? true and(X, true) >? X and(X, false) >? false if(true, X, Y) >? X if(false, X, Y) >? Y ge(O(X), O(Y)) >? ge(X, Y) ge(O(X), I(Y)) >? not(ge(Y, X)) ge(I(X), O(Y)) >? ge(X, Y) ge(I(X), I(Y)) >? ge(X, Y) ge(X, 0) >? true ge(0, O(X)) >? ge(0, X) ge(0, I(X)) >? false Log!450(0) >? 0 Log!450(I(X)) >? !plus(Log!450(X), I(0)) Log!450(O(X)) >? if(ge(X, I(0)), !plus(Log!450(X), I(0)), 0) Log(X) >? !minus(Log!450(X), I(0)) Val(L(X)) >? X Val(N(X, l, r)) >? X Min(L(X)) >? X Min(N(X, l, r)) >? Min(l) Max(L(X)) >? X Max(N(X, l, r)) >? Max(r) BS(L(X)) >? true BS(N(X, l, r)) >? and(and(ge(X, Max(l)), ge(Min(r), X)), and(BS(l), BS(r))) Size(L(X)) >? I(0) Size(N(X, l, r)) >? !plus(!plus(Size(l), Size(r)), I(1)) WB(L(X)) >? true WB(N(X, l, r)) >? and(if(ge(Size(l), Size(r)), ge(I(0), !minus(Size(l), Size(r))), ge(I(0), !minus(Size(r), Size(l)))), and(WB(l), WB(r))) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: !minus = \y0y1.y0 + y1 !plus = \y0y1.y0 + 2y1 0 = 0 1 = 0 BS = \y0.2y0 I = \y0.2y0 L = \y0.3 + y0 Log = \y0.3 + 3y0 Log!450 = \y0.2y0 Max = \y0.2y0 Min = \y0.2y0 N = \y0y1y2.3 + 3y0 + 3y1 + 3y2 O = \y0.2y0 Size = \y0.y0 Val = \y0.3 + 2y0 WB = \y0.y0 and = \y0y1.y0 + 2y1 false = 0 ge = \y0y1.2y0 + 2y1 if = \y0y1y2.y0 + y1 + y2 l = 0 not = \y0.2y0 r = 0 true = 0 Using this interpretation, the requirements translate to: [[O(0)]] = 0 >= 0 = [[0]] [[!plus(0, _x0)]] = 2x0 >= x0 = [[_x0]] [[!plus(_x0, 0)]] = x0 >= x0 = [[_x0]] [[!plus(O(_x0), O(_x1))]] = 2x0 + 4x1 >= 2x0 + 4x1 = [[O(!plus(_x0, _x1))]] [[!plus(O(_x0), I(_x1))]] = 2x0 + 4x1 >= 2x0 + 4x1 = [[I(!plus(_x0, _x1))]] [[!plus(I(_x0), O(_x1))]] = 2x0 + 4x1 >= 2x0 + 4x1 = [[I(!plus(_x0, _x1))]] [[!plus(I(_x0), I(_x1))]] = 2x0 + 4x1 >= 2x0 + 4x1 = [[O(!plus(!plus(_x0, _x1), I(0)))]] [[!plus(_x0, !plus(_x1, _x2))]] = x0 + 2x1 + 4x2 >= x0 + 2x1 + 2x2 = [[!plus(!plus(_x0, _x1), _x2)]] [[!minus(_x0, 0)]] = x0 >= x0 = [[_x0]] [[!minus(0, _x0)]] = x0 >= 0 = [[0]] [[!minus(O(_x0), O(_x1))]] = 2x0 + 2x1 >= 2x0 + 2x1 = [[O(!minus(_x0, _x1))]] [[!minus(O(_x0), I(_x1))]] = 2x0 + 2x1 >= 2x0 + 2x1 = [[I(!minus(!minus(_x0, _x1), I(1)))]] [[!minus(I(_x0), O(_x1))]] = 2x0 + 2x1 >= 2x0 + 2x1 = [[I(!minus(_x0, _x1))]] [[!minus(I(_x0), I(_x1))]] = 2x0 + 2x1 >= 2x0 + 2x1 = [[O(!minus(_x0, _x1))]] [[not(true)]] = 0 >= 0 = [[false]] [[not(false)]] = 0 >= 0 = [[true]] [[and(_x0, true)]] = x0 >= x0 = [[_x0]] [[and(_x0, false)]] = x0 >= 0 = [[false]] [[if(true, _x0, _x1)]] = x0 + x1 >= x0 = [[_x0]] [[if(false, _x0, _x1)]] = x0 + x1 >= x1 = [[_x1]] [[ge(O(_x0), O(_x1))]] = 4x0 + 4x1 >= 2x0 + 2x1 = [[ge(_x0, _x1)]] [[ge(O(_x0), I(_x1))]] = 4x0 + 4x1 >= 4x0 + 4x1 = [[not(ge(_x1, _x0))]] [[ge(I(_x0), O(_x1))]] = 4x0 + 4x1 >= 2x0 + 2x1 = [[ge(_x0, _x1)]] [[ge(I(_x0), I(_x1))]] = 4x0 + 4x1 >= 2x0 + 2x1 = [[ge(_x0, _x1)]] [[ge(_x0, 0)]] = 2x0 >= 0 = [[true]] [[ge(0, O(_x0))]] = 4x0 >= 2x0 = [[ge(0, _x0)]] [[ge(0, I(_x0))]] = 4x0 >= 0 = [[false]] [[Log!450(0)]] = 0 >= 0 = [[0]] [[Log!450(I(_x0))]] = 4x0 >= 2x0 = [[!plus(Log!450(_x0), I(0))]] [[Log!450(O(_x0))]] = 4x0 >= 4x0 = [[if(ge(_x0, I(0)), !plus(Log!450(_x0), I(0)), 0)]] [[Log(_x0)]] = 3 + 3x0 > 2x0 = [[!minus(Log!450(_x0), I(0))]] [[Val(L(_x0))]] = 9 + 2x0 > x0 = [[_x0]] [[Val(N(_x0, l, r))]] = 9 + 6x0 > x0 = [[_x0]] [[Min(L(_x0))]] = 6 + 2x0 > x0 = [[_x0]] [[Min(N(_x0, l, r))]] = 6 + 6x0 > 0 = [[Min(l)]] [[Max(L(_x0))]] = 6 + 2x0 > x0 = [[_x0]] [[Max(N(_x0, l, r))]] = 6 + 6x0 > 0 = [[Max(r)]] [[BS(L(_x0))]] = 6 + 2x0 > 0 = [[true]] [[BS(N(_x0, l, r))]] = 6 + 6x0 > 6x0 = [[and(and(ge(_x0, Max(l)), ge(Min(r), _x0)), and(BS(l), BS(r)))]] [[Size(L(_x0))]] = 3 + x0 > 0 = [[I(0)]] [[Size(N(_x0, l, r))]] = 3 + 3x0 > 0 = [[!plus(!plus(Size(l), Size(r)), I(1))]] [[WB(L(_x0))]] = 3 + x0 > 0 = [[true]] [[WB(N(_x0, l, r))]] = 3 + 3x0 > 0 = [[and(if(ge(Size(l), Size(r)), ge(I(0), !minus(Size(l), Size(r))), ge(I(0), !minus(Size(r), Size(l)))), and(WB(l), WB(r)))]] We can thus remove the following rules: Log(X) => !minus(Log!450(X), I(0)) Val(L(X)) => X Val(N(X, l, r)) => X Min(L(X)) => X Min(N(X, l, r)) => Min(l) Max(L(X)) => X Max(N(X, l, r)) => Max(r) BS(L(X)) => true BS(N(X, l, r)) => and(and(ge(X, Max(l)), ge(Min(r), X)), and(BS(l), BS(r))) Size(L(X)) => I(0) Size(N(X, l, r)) => !plus(!plus(Size(l), Size(r)), I(1)) WB(L(X)) => true WB(N(X, l, r)) => and(if(ge(Size(l), Size(r)), ge(I(0), !minus(Size(l), Size(r))), ge(I(0), !minus(Size(r), Size(l)))), and(WB(l), WB(r))) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): O(0) >? 0 !plus(0, X) >? X !plus(X, 0) >? X !plus(O(X), O(Y)) >? O(!plus(X, Y)) !plus(O(X), I(Y)) >? I(!plus(X, Y)) !plus(I(X), O(Y)) >? I(!plus(X, Y)) !plus(I(X), I(Y)) >? O(!plus(!plus(X, Y), I(0))) !plus(X, !plus(Y, Z)) >? !plus(!plus(X, Y), Z) !minus(X, 0) >? X !minus(0, X) >? 0 !minus(O(X), O(Y)) >? O(!minus(X, Y)) !minus(O(X), I(Y)) >? I(!minus(!minus(X, Y), I(1))) !minus(I(X), O(Y)) >? I(!minus(X, Y)) !minus(I(X), I(Y)) >? O(!minus(X, Y)) not(true) >? false not(false) >? true and(X, true) >? X and(X, false) >? false if(true, X, Y) >? X if(false, X, Y) >? Y ge(O(X), O(Y)) >? ge(X, Y) ge(O(X), I(Y)) >? not(ge(Y, X)) ge(I(X), O(Y)) >? ge(X, Y) ge(I(X), I(Y)) >? ge(X, Y) ge(X, 0) >? true ge(0, O(X)) >? ge(0, X) ge(0, I(X)) >? false Log!450(0) >? 0 Log!450(I(X)) >? !plus(Log!450(X), I(0)) Log!450(O(X)) >? if(ge(X, I(0)), !plus(Log!450(X), I(0)), 0) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: !minus = \y0y1.y0 + 2y1 !plus = \y0y1.y0 + 2y1 0 = 0 1 = 0 I = \y0.2y0 Log!450 = \y0.2y0 O = \y0.2y0 and = \y0y1.3 + y0 + 3y1 false = 0 ge = \y0y1.y0 + 2y1 if = \y0y1y2.y0 + y1 + y2 not = \y0.y0 true = 0 Using this interpretation, the requirements translate to: [[O(0)]] = 0 >= 0 = [[0]] [[!plus(0, _x0)]] = 2x0 >= x0 = [[_x0]] [[!plus(_x0, 0)]] = x0 >= x0 = [[_x0]] [[!plus(O(_x0), O(_x1))]] = 2x0 + 4x1 >= 2x0 + 4x1 = [[O(!plus(_x0, _x1))]] [[!plus(O(_x0), I(_x1))]] = 2x0 + 4x1 >= 2x0 + 4x1 = [[I(!plus(_x0, _x1))]] [[!plus(I(_x0), O(_x1))]] = 2x0 + 4x1 >= 2x0 + 4x1 = [[I(!plus(_x0, _x1))]] [[!plus(I(_x0), I(_x1))]] = 2x0 + 4x1 >= 2x0 + 4x1 = [[O(!plus(!plus(_x0, _x1), I(0)))]] [[!plus(_x0, !plus(_x1, _x2))]] = x0 + 2x1 + 4x2 >= x0 + 2x1 + 2x2 = [[!plus(!plus(_x0, _x1), _x2)]] [[!minus(_x0, 0)]] = x0 >= x0 = [[_x0]] [[!minus(0, _x0)]] = 2x0 >= 0 = [[0]] [[!minus(O(_x0), O(_x1))]] = 2x0 + 4x1 >= 2x0 + 4x1 = [[O(!minus(_x0, _x1))]] [[!minus(O(_x0), I(_x1))]] = 2x0 + 4x1 >= 2x0 + 4x1 = [[I(!minus(!minus(_x0, _x1), I(1)))]] [[!minus(I(_x0), O(_x1))]] = 2x0 + 4x1 >= 2x0 + 4x1 = [[I(!minus(_x0, _x1))]] [[!minus(I(_x0), I(_x1))]] = 2x0 + 4x1 >= 2x0 + 4x1 = [[O(!minus(_x0, _x1))]] [[not(true)]] = 0 >= 0 = [[false]] [[not(false)]] = 0 >= 0 = [[true]] [[and(_x0, true)]] = 3 + x0 > x0 = [[_x0]] [[and(_x0, false)]] = 3 + x0 > 0 = [[false]] [[if(true, _x0, _x1)]] = x0 + x1 >= x0 = [[_x0]] [[if(false, _x0, _x1)]] = x0 + x1 >= x1 = [[_x1]] [[ge(O(_x0), O(_x1))]] = 2x0 + 4x1 >= x0 + 2x1 = [[ge(_x0, _x1)]] [[ge(O(_x0), I(_x1))]] = 2x0 + 4x1 >= x1 + 2x0 = [[not(ge(_x1, _x0))]] [[ge(I(_x0), O(_x1))]] = 2x0 + 4x1 >= x0 + 2x1 = [[ge(_x0, _x1)]] [[ge(I(_x0), I(_x1))]] = 2x0 + 4x1 >= x0 + 2x1 = [[ge(_x0, _x1)]] [[ge(_x0, 0)]] = x0 >= 0 = [[true]] [[ge(0, O(_x0))]] = 4x0 >= 2x0 = [[ge(0, _x0)]] [[ge(0, I(_x0))]] = 4x0 >= 0 = [[false]] [[Log!450(0)]] = 0 >= 0 = [[0]] [[Log!450(I(_x0))]] = 4x0 >= 2x0 = [[!plus(Log!450(_x0), I(0))]] [[Log!450(O(_x0))]] = 4x0 >= 3x0 = [[if(ge(_x0, I(0)), !plus(Log!450(_x0), I(0)), 0)]] We can thus remove the following rules: and(X, true) => X and(X, false) => false We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): O(0) >? 0 !plus(0, X) >? X !plus(X, 0) >? X !plus(O(X), O(Y)) >? O(!plus(X, Y)) !plus(O(X), I(Y)) >? I(!plus(X, Y)) !plus(I(X), O(Y)) >? I(!plus(X, Y)) !plus(I(X), I(Y)) >? O(!plus(!plus(X, Y), I(0))) !plus(X, !plus(Y, Z)) >? !plus(!plus(X, Y), Z) !minus(X, 0) >? X !minus(0, X) >? 0 !minus(O(X), O(Y)) >? O(!minus(X, Y)) !minus(O(X), I(Y)) >? I(!minus(!minus(X, Y), I(1))) !minus(I(X), O(Y)) >? I(!minus(X, Y)) !minus(I(X), I(Y)) >? O(!minus(X, Y)) not(true) >? false not(false) >? true if(true, X, Y) >? X if(false, X, Y) >? Y ge(O(X), O(Y)) >? ge(X, Y) ge(O(X), I(Y)) >? not(ge(Y, X)) ge(I(X), O(Y)) >? ge(X, Y) ge(I(X), I(Y)) >? ge(X, Y) ge(X, 0) >? true ge(0, O(X)) >? ge(0, X) ge(0, I(X)) >? false Log!450(0) >? 0 Log!450(I(X)) >? !plus(Log!450(X), I(0)) Log!450(O(X)) >? if(ge(X, I(0)), !plus(Log!450(X), I(0)), 0) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: !minus = \y0y1.y0 + 2y1 !plus = \y0y1.y0 + y1 0 = 0 1 = 0 I = \y0.3y0 Log!450 = \y0.1 + y0 O = \y0.3y0 false = 0 ge = \y0y1.y1 + 2y0 if = \y0y1y2.y0 + y1 + y2 not = \y0.y0 true = 0 Using this interpretation, the requirements translate to: [[O(0)]] = 0 >= 0 = [[0]] [[!plus(0, _x0)]] = x0 >= x0 = [[_x0]] [[!plus(_x0, 0)]] = x0 >= x0 = [[_x0]] [[!plus(O(_x0), O(_x1))]] = 3x0 + 3x1 >= 3x0 + 3x1 = [[O(!plus(_x0, _x1))]] [[!plus(O(_x0), I(_x1))]] = 3x0 + 3x1 >= 3x0 + 3x1 = [[I(!plus(_x0, _x1))]] [[!plus(I(_x0), O(_x1))]] = 3x0 + 3x1 >= 3x0 + 3x1 = [[I(!plus(_x0, _x1))]] [[!plus(I(_x0), I(_x1))]] = 3x0 + 3x1 >= 3x0 + 3x1 = [[O(!plus(!plus(_x0, _x1), I(0)))]] [[!plus(_x0, !plus(_x1, _x2))]] = x0 + x1 + x2 >= x0 + x1 + x2 = [[!plus(!plus(_x0, _x1), _x2)]] [[!minus(_x0, 0)]] = x0 >= x0 = [[_x0]] [[!minus(0, _x0)]] = 2x0 >= 0 = [[0]] [[!minus(O(_x0), O(_x1))]] = 3x0 + 6x1 >= 3x0 + 6x1 = [[O(!minus(_x0, _x1))]] [[!minus(O(_x0), I(_x1))]] = 3x0 + 6x1 >= 3x0 + 6x1 = [[I(!minus(!minus(_x0, _x1), I(1)))]] [[!minus(I(_x0), O(_x1))]] = 3x0 + 6x1 >= 3x0 + 6x1 = [[I(!minus(_x0, _x1))]] [[!minus(I(_x0), I(_x1))]] = 3x0 + 6x1 >= 3x0 + 6x1 = [[O(!minus(_x0, _x1))]] [[not(true)]] = 0 >= 0 = [[false]] [[not(false)]] = 0 >= 0 = [[true]] [[if(true, _x0, _x1)]] = x0 + x1 >= x0 = [[_x0]] [[if(false, _x0, _x1)]] = x0 + x1 >= x1 = [[_x1]] [[ge(O(_x0), O(_x1))]] = 3x1 + 6x0 >= x1 + 2x0 = [[ge(_x0, _x1)]] [[ge(O(_x0), I(_x1))]] = 3x1 + 6x0 >= x0 + 2x1 = [[not(ge(_x1, _x0))]] [[ge(I(_x0), O(_x1))]] = 3x1 + 6x0 >= x1 + 2x0 = [[ge(_x0, _x1)]] [[ge(I(_x0), I(_x1))]] = 3x1 + 6x0 >= x1 + 2x0 = [[ge(_x0, _x1)]] [[ge(_x0, 0)]] = 2x0 >= 0 = [[true]] [[ge(0, O(_x0))]] = 3x0 >= x0 = [[ge(0, _x0)]] [[ge(0, I(_x0))]] = 3x0 >= 0 = [[false]] [[Log!450(0)]] = 1 > 0 = [[0]] [[Log!450(I(_x0))]] = 1 + 3x0 >= 1 + x0 = [[!plus(Log!450(_x0), I(0))]] [[Log!450(O(_x0))]] = 1 + 3x0 >= 1 + 3x0 = [[if(ge(_x0, I(0)), !plus(Log!450(_x0), I(0)), 0)]] We can thus remove the following rules: Log!450(0) => 0 We use the dependency pair framework as described in [Kop12, Ch. 6/7], with static dependency pairs (see [KusIsoSakBla09] and the adaptation for AFSMs in [Kop12, Ch. 7.8]). We thus obtain the following dependency pair problem (P_0, R_0, minimal, formative): Dependency Pairs P_0: 0] !plus#(O(X), O(Y)) =#> O#(!plus(X, Y)) 1] !plus#(O(X), O(Y)) =#> !plus#(X, Y) 2] !plus#(O(X), I(Y)) =#> !plus#(X, Y) 3] !plus#(I(X), O(Y)) =#> !plus#(X, Y) 4] !plus#(I(X), I(Y)) =#> O#(!plus(!plus(X, Y), I(0))) 5] !plus#(I(X), I(Y)) =#> !plus#(!plus(X, Y), I(0)) 6] !plus#(I(X), I(Y)) =#> !plus#(X, Y) 7] !plus#(X, !plus(Y, Z)) =#> !plus#(!plus(X, Y), Z) 8] !plus#(X, !plus(Y, Z)) =#> !plus#(X, Y) 9] !minus#(O(X), O(Y)) =#> O#(!minus(X, Y)) 10] !minus#(O(X), O(Y)) =#> !minus#(X, Y) 11] !minus#(O(X), I(Y)) =#> !minus#(!minus(X, Y), I(1)) 12] !minus#(O(X), I(Y)) =#> !minus#(X, Y) 13] !minus#(I(X), O(Y)) =#> !minus#(X, Y) 14] !minus#(I(X), I(Y)) =#> O#(!minus(X, Y)) 15] !minus#(I(X), I(Y)) =#> !minus#(X, Y) 16] ge#(O(X), O(Y)) =#> ge#(X, Y) 17] ge#(O(X), I(Y)) =#> not#(ge(Y, X)) 18] ge#(O(X), I(Y)) =#> ge#(Y, X) 19] ge#(I(X), O(Y)) =#> ge#(X, Y) 20] ge#(I(X), I(Y)) =#> ge#(X, Y) 21] ge#(0, O(X)) =#> ge#(0, X) 22] Log!450#(I(X)) =#> !plus#(Log!450(X), I(0)) 23] Log!450#(I(X)) =#> Log!450#(X) 24] Log!450#(O(X)) =#> if#(ge(X, I(0)), !plus(Log!450(X), I(0)), 0) 25] Log!450#(O(X)) =#> ge#(X, I(0)) 26] Log!450#(O(X)) =#> !plus#(Log!450(X), I(0)) 27] Log!450#(O(X)) =#> Log!450#(X) Rules R_0: O(0) => 0 !plus(0, X) => X !plus(X, 0) => X !plus(O(X), O(Y)) => O(!plus(X, Y)) !plus(O(X), I(Y)) => I(!plus(X, Y)) !plus(I(X), O(Y)) => I(!plus(X, Y)) !plus(I(X), I(Y)) => O(!plus(!plus(X, Y), I(0))) !plus(X, !plus(Y, Z)) => !plus(!plus(X, Y), Z) !minus(X, 0) => X !minus(0, X) => 0 !minus(O(X), O(Y)) => O(!minus(X, Y)) !minus(O(X), I(Y)) => I(!minus(!minus(X, Y), I(1))) !minus(I(X), O(Y)) => I(!minus(X, Y)) !minus(I(X), I(Y)) => O(!minus(X, Y)) not(true) => false not(false) => true if(true, X, Y) => X if(false, X, Y) => Y ge(O(X), O(Y)) => ge(X, Y) ge(O(X), I(Y)) => not(ge(Y, X)) ge(I(X), O(Y)) => ge(X, Y) ge(I(X), I(Y)) => ge(X, Y) ge(X, 0) => true ge(0, O(X)) => ge(0, X) ge(0, I(X)) => false Log!450(I(X)) => !plus(Log!450(X), I(0)) Log!450(O(X)) => if(ge(X, I(0)), !plus(Log!450(X), I(0)), 0) 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 place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: * 0 : * 1 : 0, 1, 2, 3, 4, 5, 6, 7, 8 * 2 : 0, 1, 2, 3, 4, 5, 6, 7, 8 * 3 : 0, 1, 2, 3, 4, 5, 6, 7, 8 * 4 : * 5 : 2, 4, 5, 6 * 6 : 0, 1, 2, 3, 4, 5, 6, 7, 8 * 7 : 0, 1, 2, 3, 4, 5, 6, 7, 8 * 8 : 0, 1, 2, 3, 4, 5, 6, 7, 8 * 9 : * 10 : 9, 10, 11, 12, 13, 14, 15 * 11 : 11, 12, 14, 15 * 12 : 9, 10, 11, 12, 13, 14, 15 * 13 : 9, 10, 11, 12, 13, 14, 15 * 14 : * 15 : 9, 10, 11, 12, 13, 14, 15 * 16 : 16, 17, 18, 19, 20, 21 * 17 : * 18 : 16, 17, 18, 19, 20, 21 * 19 : 16, 17, 18, 19, 20, 21 * 20 : 16, 17, 18, 19, 20, 21 * 21 : 21 * 22 : 2, 4, 5, 6 * 23 : 22, 23, 24, 25, 26, 27 * 24 : * 25 : 17, 18, 20 * 26 : 2, 4, 5, 6 * 27 : 22, 23, 24, 25, 26, 27 This graph has the following strongly connected components: P_1: !plus#(O(X), O(Y)) =#> !plus#(X, Y) !plus#(O(X), I(Y)) =#> !plus#(X, Y) !plus#(I(X), O(Y)) =#> !plus#(X, Y) !plus#(I(X), I(Y)) =#> !plus#(!plus(X, Y), I(0)) !plus#(I(X), I(Y)) =#> !plus#(X, Y) !plus#(X, !plus(Y, Z)) =#> !plus#(!plus(X, Y), Z) !plus#(X, !plus(Y, Z)) =#> !plus#(X, Y) P_2: !minus#(O(X), O(Y)) =#> !minus#(X, Y) !minus#(O(X), I(Y)) =#> !minus#(!minus(X, Y), I(1)) !minus#(O(X), I(Y)) =#> !minus#(X, Y) !minus#(I(X), O(Y)) =#> !minus#(X, Y) !minus#(I(X), I(Y)) =#> !minus#(X, Y) P_3: ge#(O(X), O(Y)) =#> ge#(X, Y) ge#(O(X), I(Y)) =#> ge#(Y, X) ge#(I(X), O(Y)) =#> ge#(X, Y) ge#(I(X), I(Y)) =#> ge#(X, Y) P_4: ge#(0, O(X)) =#> ge#(0, X) P_5: Log!450#(I(X)) =#> Log!450#(X) Log!450#(O(X)) =#> Log!450#(X) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_0, R_0, m, f) by (P_1, R_0, m, f), (P_2, R_0, m, f), (P_3, R_0, m, f), (P_4, R_0, m, f) and (P_5, R_0, m, f). Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, 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 apply the subterm criterion with the following projection function: nu(Log!450#) = 1 Thus, we can orient the dependency pairs as follows: nu(Log!450#(I(X))) = I(X) |> X = nu(Log!450#(X)) nu(Log!450#(O(X))) = O(X) |> X = nu(Log!450#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_5, R_0, minimal, f) by ({}, R_0, minimal, f). 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_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, 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 apply the subterm criterion with the following projection function: nu(ge#) = 2 Thus, we can orient the dependency pairs as follows: nu(ge#(0, O(X))) = O(X) |> X = nu(ge#(0, X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_4, R_0, minimal, f) by ({}, R_0, minimal, f). 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_1, R_0, minimal, formative), (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 with usable rules [Kop12, Thm. 7.44]. (P_3, R_0) has no usable rules. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: ge#(O(X), O(Y)) >? ge#(X, Y) ge#(O(X), I(Y)) >? ge#(Y, X) ge#(I(X), O(Y)) >? ge#(X, Y) ge#(I(X), I(Y)) >? ge#(X, Y) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: I = \y0.3 + y0 O = \y0.3 + y0 ge# = \y0y1.y0 + y1 Using this interpretation, the requirements translate to: [[ge#(O(_x0), O(_x1))]] = 6 + x0 + x1 > x0 + x1 = [[ge#(_x0, _x1)]] [[ge#(O(_x0), I(_x1))]] = 6 + x0 + x1 > x0 + x1 = [[ge#(_x1, _x0)]] [[ge#(I(_x0), O(_x1))]] = 6 + x0 + x1 > x0 + x1 = [[ge#(_x0, _x1)]] [[ge#(I(_x0), I(_x1))]] = 6 + x0 + x1 > x0 + x1 = [[ge#(_x0, _x1)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_3, 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_1, R_0, minimal, formative) and (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]. The usable rules of (P_2, R_0) are: O(0) => 0 !minus(X, 0) => X !minus(0, X) => 0 !minus(O(X), O(Y)) => O(!minus(X, Y)) !minus(O(X), I(Y)) => I(!minus(!minus(X, Y), I(1))) !minus(I(X), O(Y)) => I(!minus(X, Y)) !minus(I(X), I(Y)) => O(!minus(X, Y)) It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: !minus#(O(X), O(Y)) >? !minus#(X, Y) !minus#(O(X), I(Y)) >? !minus#(!minus(X, Y), I(1)) !minus#(O(X), I(Y)) >? !minus#(X, Y) !minus#(I(X), O(Y)) >? !minus#(X, Y) !minus#(I(X), I(Y)) >? !minus#(X, Y) O(0) >= 0 !minus(X, 0) >= X !minus(0, X) >= 0 !minus(O(X), O(Y)) >= O(!minus(X, Y)) !minus(O(X), I(Y)) >= I(!minus(!minus(X, Y), I(1))) !minus(I(X), O(Y)) >= I(!minus(X, Y)) !minus(I(X), I(Y)) >= O(!minus(X, Y)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: !minus = \y0y1.y0 !minus# = \y0y1.y0 0 = 1 1 = 0 I = \y0.1 + y0 O = \y0.1 + y0 Using this interpretation, the requirements translate to: [[!minus#(O(_x0), O(_x1))]] = 1 + x0 > x0 = [[!minus#(_x0, _x1)]] [[!minus#(O(_x0), I(_x1))]] = 1 + x0 > x0 = [[!minus#(!minus(_x0, _x1), I(1))]] [[!minus#(O(_x0), I(_x1))]] = 1 + x0 > x0 = [[!minus#(_x0, _x1)]] [[!minus#(I(_x0), O(_x1))]] = 1 + x0 > x0 = [[!minus#(_x0, _x1)]] [[!minus#(I(_x0), I(_x1))]] = 1 + x0 > x0 = [[!minus#(_x0, _x1)]] [[O(0)]] = 2 >= 1 = [[0]] [[!minus(_x0, 0)]] = x0 >= x0 = [[_x0]] [[!minus(0, _x0)]] = 1 >= 1 = [[0]] [[!minus(O(_x0), O(_x1))]] = 1 + x0 >= 1 + x0 = [[O(!minus(_x0, _x1))]] [[!minus(O(_x0), I(_x1))]] = 1 + x0 >= 1 + x0 = [[I(!minus(!minus(_x0, _x1), I(1)))]] [[!minus(I(_x0), O(_x1))]] = 1 + x0 >= 1 + x0 = [[I(!minus(_x0, _x1))]] [[!minus(I(_x0), I(_x1))]] = 1 + x0 >= 1 + x0 = [[O(!minus(_x0, _x1))]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_2, 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_1, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_1, R_0, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. The usable rules of (P_1, R_0) are: O(0) => 0 !plus(0, X) => X !plus(X, 0) => X !plus(O(X), O(Y)) => O(!plus(X, Y)) !plus(O(X), I(Y)) => I(!plus(X, Y)) !plus(I(X), O(Y)) => I(!plus(X, Y)) !plus(I(X), I(Y)) => O(!plus(!plus(X, Y), I(0))) !plus(X, !plus(Y, Z)) => !plus(!plus(X, Y), Z) It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: !plus#(O(X), O(Y)) >? !plus#(X, Y) !plus#(O(X), I(Y)) >? !plus#(X, Y) !plus#(I(X), O(Y)) >? !plus#(X, Y) !plus#(I(X), I(Y)) >? !plus#(!plus(X, Y), I(0)) !plus#(I(X), I(Y)) >? !plus#(X, Y) !plus#(X, !plus(Y, Z)) >? !plus#(!plus(X, Y), Z) !plus#(X, !plus(Y, Z)) >? !plus#(X, Y) O(0) >= 0 !plus(0, X) >= X !plus(X, 0) >= X !plus(O(X), O(Y)) >= O(!plus(X, Y)) !plus(O(X), I(Y)) >= I(!plus(X, Y)) !plus(I(X), O(Y)) >= I(!plus(X, Y)) !plus(I(X), I(Y)) >= O(!plus(!plus(X, Y), I(0))) !plus(X, !plus(Y, Z)) >= !plus(!plus(X, Y), Z) We orient these requirements with a polynomial interpretation in the natural numbers. We consider usable_rules with respect to the following argument filtering: !plus#(x_1,x_2) = !plus#(x_2) This leaves the following ordering requirements: !plus#(O(X), O(Y)) >= !plus#(X, Y) !plus#(O(X), I(Y)) >= !plus#(X, Y) !plus#(I(X), O(Y)) >= !plus#(X, Y) !plus#(I(X), I(Y)) >= !plus#(!plus(X, Y), I(0)) !plus#(I(X), I(Y)) >= !plus#(X, Y) !plus#(X, !plus(Y, Z)) > !plus#(!plus(X, Y), Z) !plus#(X, !plus(Y, Z)) >= !plus#(X, Y) The following interpretation satisfies the requirements: !plus = \y0y1.2 + y1 + 2y0 !plus# = \y0y1.y1 0 = 0 I = \y0.2y0 O = \y0.y0 Using this interpretation, the requirements translate to: [[!plus#(O(_x0), O(_x1))]] = x1 >= x1 = [[!plus#(_x0, _x1)]] [[!plus#(O(_x0), I(_x1))]] = 2x1 >= x1 = [[!plus#(_x0, _x1)]] [[!plus#(I(_x0), O(_x1))]] = x1 >= x1 = [[!plus#(_x0, _x1)]] [[!plus#(I(_x0), I(_x1))]] = 2x1 >= 0 = [[!plus#(!plus(_x0, _x1), I(0))]] [[!plus#(I(_x0), I(_x1))]] = 2x1 >= x1 = [[!plus#(_x0, _x1)]] [[!plus#(_x0, !plus(_x1, _x2))]] = 2 + x2 + 2x1 > x2 = [[!plus#(!plus(_x0, _x1), _x2)]] [[!plus#(_x0, !plus(_x1, _x2))]] = 2 + x2 + 2x1 > x1 = [[!plus#(_x0, _x1)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_1, R_0, minimal, formative) by (P_6, R_0, minimal, formative), where P_6 consists of: !plus#(O(X), O(Y)) =#> !plus#(X, Y) !plus#(O(X), I(Y)) =#> !plus#(X, Y) !plus#(I(X), O(Y)) =#> !plus#(X, Y) !plus#(I(X), I(Y)) =#> !plus#(!plus(X, Y), I(0)) !plus#(I(X), I(Y)) =#> !plus#(X, Y) Thus, the original system is terminating if (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]. The usable rules of (P_6, R_0) are: O(0) => 0 !plus(0, X) => X !plus(X, 0) => X !plus(O(X), O(Y)) => O(!plus(X, Y)) !plus(O(X), I(Y)) => I(!plus(X, Y)) !plus(I(X), O(Y)) => I(!plus(X, Y)) !plus(I(X), I(Y)) => O(!plus(!plus(X, Y), I(0))) !plus(X, !plus(Y, Z)) => !plus(!plus(X, Y), Z) It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: !plus#(O(X), O(Y)) >? !plus#(X, Y) !plus#(O(X), I(Y)) >? !plus#(X, Y) !plus#(I(X), O(Y)) >? !plus#(X, Y) !plus#(I(X), I(Y)) >? !plus#(!plus(X, Y), I(0)) !plus#(I(X), I(Y)) >? !plus#(X, Y) O(0) >= 0 !plus(0, X) >= X !plus(X, 0) >= X !plus(O(X), O(Y)) >= O(!plus(X, Y)) !plus(O(X), I(Y)) >= I(!plus(X, Y)) !plus(I(X), O(Y)) >= I(!plus(X, Y)) !plus(I(X), I(Y)) >= O(!plus(!plus(X, Y), I(0))) !plus(X, !plus(Y, Z)) >= !plus(!plus(X, Y), Z) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: !plus = \y0y1.y0 + y1 !plus# = \y0y1.y0 + y1 0 = 0 I = \y0.1 + y0 O = \y0.1 + y0 Using this interpretation, the requirements translate to: [[!plus#(O(_x0), O(_x1))]] = 2 + x0 + x1 > x0 + x1 = [[!plus#(_x0, _x1)]] [[!plus#(O(_x0), I(_x1))]] = 2 + x0 + x1 > x0 + x1 = [[!plus#(_x0, _x1)]] [[!plus#(I(_x0), O(_x1))]] = 2 + x0 + x1 > x0 + x1 = [[!plus#(_x0, _x1)]] [[!plus#(I(_x0), I(_x1))]] = 2 + x0 + x1 > 1 + x0 + x1 = [[!plus#(!plus(_x0, _x1), I(0))]] [[!plus#(I(_x0), I(_x1))]] = 2 + x0 + x1 > x0 + x1 = [[!plus#(_x0, _x1)]] [[O(0)]] = 1 >= 0 = [[0]] [[!plus(0, _x0)]] = x0 >= x0 = [[_x0]] [[!plus(_x0, 0)]] = x0 >= x0 = [[_x0]] [[!plus(O(_x0), O(_x1))]] = 2 + x0 + x1 >= 1 + x0 + x1 = [[O(!plus(_x0, _x1))]] [[!plus(O(_x0), I(_x1))]] = 2 + x0 + x1 >= 1 + x0 + x1 = [[I(!plus(_x0, _x1))]] [[!plus(I(_x0), O(_x1))]] = 2 + x0 + x1 >= 1 + x0 + x1 = [[I(!plus(_x0, _x1))]] [[!plus(I(_x0), I(_x1))]] = 2 + x0 + x1 >= 2 + x0 + x1 = [[O(!plus(!plus(_x0, _x1), I(0)))]] [[!plus(_x0, !plus(_x1, _x2))]] = x0 + x1 + x2 >= x0 + x1 + x2 = [[!plus(!plus(_x0, _x1), _x2)]] 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. As all dependency pair problems were succesfully simplified with sound (and complete) processors until nothing remained, we conclude termination. +++ Citations +++ [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. [KusIsoSakBla09] K. Kusakari, Y. Isogai, M. Sakai, and F. Blanqui. Static Dependency Pair Method Based On Strong Computability for Higher-Order Rewrite Systems. In volume 92(10) of IEICE Transactions on Information and Systems. 2007--2015, 2009.