YES Termination w.r.t. Q proof of CiME_04_filliatre2.ari

(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

g(A) → A
g(B) → A
g(B) → B
g(C) → A
g(C) → B
g(C) → C
foldB(t, 0) → t
foldB(t, s(n)) → f(foldB(t, n), B)
foldC(t, 0) → t
foldC(t, s(n)) → f(foldC(t, n), C)
f(t, x) → f'(t, g(x))
f'(triple(a, b, c), C) → triple(a, b, s(c))
f'(triple(a, b, c), B) → f(triple(a, b, c), A)
f'(triple(a, b, c), A) → f''(foldB(triple(s(a), 0, c), b))
f''(triple(a, b, c)) → foldC(triple(a, b, 0), c)

Q is empty.

(1) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(A) = 2   
POL(B) = 2   
POL(C) = 2   
POL(f(x1, x2)) = x1 + 2·x2   
POL(f'(x1, x2)) = x1 + 2·x2   
POL(f''(x1)) = x1   
POL(foldB(x1, x2)) = 2 + x1 + 2·x2   
POL(foldC(x1, x2)) = x1 + 2·x2   
POL(g(x1)) = x1   
POL(s(x1)) = 2 + x1   
POL(triple(x1, x2, x3)) = x1 + 2·x2 + 2·x3   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

foldB(t, 0) → t


(2) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

g(A) → A
g(B) → A
g(B) → B
g(C) → A
g(C) → B
g(C) → C
foldB(t, s(n)) → f(foldB(t, n), B)
foldC(t, 0) → t
foldC(t, s(n)) → f(foldC(t, n), C)
f(t, x) → f'(t, g(x))
f'(triple(a, b, c), C) → triple(a, b, s(c))
f'(triple(a, b, c), B) → f(triple(a, b, c), A)
f'(triple(a, b, c), A) → f''(foldB(triple(s(a), 0, c), b))
f''(triple(a, b, c)) → foldC(triple(a, b, 0), c)

Q is empty.

(3) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(A) = 1   
POL(B) = 1   
POL(C) = 1   
POL(f(x1, x2)) = 1 + x1 + x2   
POL(f'(x1, x2)) = 1 + x1 + x2   
POL(f''(x1)) = x1   
POL(foldB(x1, x2)) = x1 + 2·x2   
POL(foldC(x1, x2)) = x1 + 2·x2   
POL(g(x1)) = x1   
POL(s(x1)) = 1 + x1   
POL(triple(x1, x2, x3)) = x1 + 2·x2 + 2·x3   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

f'(triple(a, b, c), A) → f''(foldB(triple(s(a), 0, c), b))


(4) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

g(A) → A
g(B) → A
g(B) → B
g(C) → A
g(C) → B
g(C) → C
foldB(t, s(n)) → f(foldB(t, n), B)
foldC(t, 0) → t
foldC(t, s(n)) → f(foldC(t, n), C)
f(t, x) → f'(t, g(x))
f'(triple(a, b, c), C) → triple(a, b, s(c))
f'(triple(a, b, c), B) → f(triple(a, b, c), A)
f''(triple(a, b, c)) → foldC(triple(a, b, 0), c)

Q is empty.

(5) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Knuth-Bendix order [KBO] with precedence:
g1 > C > foldC2 > A > foldB2 > f2 > f'2 > 0 > triple3 > f''1 > s1 > B

and weight map:

A=1
B=2
C=2
0=2
g_1=0
s_1=2
f''_1=3
f_2=0
foldC_2=0
f'_2=0
triple_3=0
foldB_2=0

The variable weight is 1With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

g(A) → A
g(B) → A
g(B) → B
g(C) → A
g(C) → B
g(C) → C
foldB(t, s(n)) → f(foldB(t, n), B)
foldC(t, 0) → t
foldC(t, s(n)) → f(foldC(t, n), C)
f(t, x) → f'(t, g(x))
f'(triple(a, b, c), C) → triple(a, b, s(c))
f'(triple(a, b, c), B) → f(triple(a, b, c), A)
f''(triple(a, b, c)) → foldC(triple(a, b, 0), c)


(6) Obligation:

Q restricted rewrite system:
R is empty.
Q is empty.

(7) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(8) YES