YES
0 QTRS
↳1 QTRSRRRProof (⇔, 74 ms)
↳2 QTRS
↳3 QTRSRRRProof (⇔, 0 ms)
↳4 QTRS
↳5 QTRSRRRProof (⇔, 0 ms)
↳6 QTRS
↳7 QTRSRRRProof (⇔, 5 ms)
↳8 QTRS
↳9 QTRSRRRProof (⇔, 0 ms)
↳10 QTRS
↳11 RisEmptyProof (⇔, 0 ms)
↳12 YES
g(A) → A
g(B) → A
g(B) → B
g(C) → A
g(C) → B
g(C) → C
foldf(x, nil) → x
foldf(x, cons(y, z)) → f(foldf(x, z), y)
f(t, x) → f'(t, g(x))
f'(triple(a, b, c), C) → triple(a, b, cons(C, c))
f'(triple(a, b, c), B) → f(triple(a, b, c), A)
f'(triple(a, b, c), A) → f''(foldf(triple(cons(A, a), nil, c), b))
f''(triple(a, b, c)) → foldf(triple(a, b, nil), c)
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
POL(A) = 2
POL(B) = 2
POL(C) = 2
POL(cons(x1, x2)) = x1 + x2
POL(f(x1, x2)) = x1 + 2·x2
POL(f'(x1, x2)) = x1 + 2·x2
POL(f''(x1)) = 2 + x1
POL(foldf(x1, x2)) = x1 + 2·x2
POL(g(x1)) = x1
POL(nil) = 0
POL(triple(x1, x2, x3)) = x1 + 2·x2 + 2·x3
f''(triple(a, b, c)) → foldf(triple(a, b, nil), c)
g(A) → A
g(B) → A
g(B) → B
g(C) → A
g(C) → B
g(C) → C
foldf(x, nil) → x
foldf(x, cons(y, z)) → f(foldf(x, z), y)
f(t, x) → f'(t, g(x))
f'(triple(a, b, c), C) → triple(a, b, cons(C, c))
f'(triple(a, b, c), B) → f(triple(a, b, c), A)
f'(triple(a, b, c), A) → f''(foldf(triple(cons(A, a), nil, c), b))
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
POL(A) = 0
POL(B) = 0
POL(C) = 1
POL(cons(x1, x2)) = x1 + x2
POL(f(x1, x2)) = x1 + x2
POL(f'(x1, x2)) = x1 + x2
POL(f''(x1)) = x1
POL(foldf(x1, x2)) = x1 + x2
POL(g(x1)) = x1
POL(nil) = 0
POL(triple(x1, x2, x3)) = x1 + x2 + x3
g(C) → A
g(C) → B
g(A) → A
g(B) → A
g(B) → B
g(C) → C
foldf(x, nil) → x
foldf(x, cons(y, z)) → f(foldf(x, z), y)
f(t, x) → f'(t, g(x))
f'(triple(a, b, c), C) → triple(a, b, cons(C, c))
f'(triple(a, b, c), B) → f(triple(a, b, c), A)
f'(triple(a, b, c), A) → f''(foldf(triple(cons(A, a), nil, c), b))
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
POL(A) = 0
POL(B) = 1
POL(C) = 0
POL(cons(x1, x2)) = x1 + x2
POL(f(x1, x2)) = x1 + x2
POL(f'(x1, x2)) = x1 + x2
POL(f''(x1)) = x1
POL(foldf(x1, x2)) = x1 + x2
POL(g(x1)) = x1
POL(nil) = 0
POL(triple(x1, x2, x3)) = x1 + x2 + x3
g(B) → A
f'(triple(a, b, c), B) → f(triple(a, b, c), A)
g(A) → A
g(B) → B
g(C) → C
foldf(x, nil) → x
foldf(x, cons(y, z)) → f(foldf(x, z), y)
f(t, x) → f'(t, g(x))
f'(triple(a, b, c), C) → triple(a, b, cons(C, c))
f'(triple(a, b, c), A) → f''(foldf(triple(cons(A, a), nil, c), b))
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
POL(A) = 1
POL(B) = 2
POL(C) = 0
POL(cons(x1, x2)) = 1 + x1 + x2
POL(f(x1, x2)) = 2 + x1 + 2·x2
POL(f'(x1, x2)) = 1 + x1 + 2·x2
POL(f''(x1)) = x1
POL(foldf(x1, x2)) = x1 + 2·x2
POL(g(x1)) = x1
POL(nil) = 0
POL(triple(x1, x2, x3)) = 1 + x1 + 2·x2 + x3
f(t, x) → f'(t, g(x))
f'(triple(a, b, c), A) → f''(foldf(triple(cons(A, a), nil, c), b))
g(A) → A
g(B) → B
g(C) → C
foldf(x, nil) → x
foldf(x, cons(y, z)) → f(foldf(x, z), y)
f'(triple(a, b, c), C) → triple(a, b, cons(C, c))
g1 > f'2 > triple3 > A > B > foldf2 > f2 > nil > cons2 > C
A=1
B=1
C=1
nil=1
g_1=0
foldf_2=0
cons_2=0
f_2=0
triple_3=0
f'_2=0
g(A) → A
g(B) → B
g(C) → C
foldf(x, nil) → x
foldf(x, cons(y, z)) → f(foldf(x, z), y)
f'(triple(a, b, c), C) → triple(a, b, cons(C, c))