YES(?,O(n^3)) TRS: { f mark x -> mark f x, f ok x -> ok f x, f found x -> found f x, active f x -> f active x, active f x -> mark x, top mark x -> top check x, top active c() -> top mark c(), top found x -> top active x, check x -> start match(f X(), x), check f x -> f check x, start ok x -> found x, match(f x, f y) -> f match(x, y), match(X(), x) -> proper x, proper f x -> f proper x, proper c() -> ok c() } DUP: We consider a non-duplicating system. Trs: { f mark x -> mark f x, f ok x -> ok f x, f found x -> found f x, active f x -> f active x, active f x -> mark x, top mark x -> top check x, top active c() -> top mark c(), top found x -> top active x, check x -> start match(f X(), x), check f x -> f check x, start ok x -> found x, match(f x, f y) -> f match(x, y), match(X(), x) -> proper x, proper f x -> f proper x, proper c() -> ok c() } Matrix Interpretation: Interpretation class: triangular [X2] [1 1 3][X2] [0] [found]([X1]) = [0 1 0][X1] + [1] [X0] [0 0 0][X0] [0] [X2] [1 1 0][X2] [1] [ok]([X1]) = [0 1 0][X1] + [1] [X0] [0 0 1][X0] [0] [X2] [1 2 0][X2] [1] [proper]([X1]) = [0 1 0][X1] + [1] [X0] [0 0 0][X0] [3] [0] [X] = [0] [3] [X5] [X2] [1 0 0][X5] [1 2 0][X2] [2] [match]([X4], [X1]) = [0 0 0][X4] + [0 1 0][X1] + [1] [X3] [X0] [0 0 1][X3] [0 0 0][X0] [0] [X2] [1 0 3][X2] [0] [start]([X1]) = [0 1 0][X1] + [0] [X0] [0 0 0][X0] [0] [X2] [1 2 0][X2] [3] [check]([X1]) = [0 1 0][X1] + [1] [X0] [0 0 0][X0] [0] [3] [c] = [1] [3] [X2] [1 2 3][X2] [0] [top]([X1]) = [0 0 0][X1] + [0] [X0] [0 0 0][X0] [0] [X2] [1 1 0][X2] [1] [active]([X1]) = [0 1 0][X1] + [0] [X0] [0 0 1][X0] [0] [X2] [1 2 0][X2] [2] [mark]([X1]) = [0 1 0][X1] + [2] [X0] [0 0 0][X0] [0] [X2] [1 3 0][X2] [0] [f]([X1]) = [0 1 0][X1] + [2] [X0] [0 0 0][X0] [0] Qed