YES Termination Proof

Termination Proof

by ttt2 (version ttt2 1.15)

Input

The rewrite relation of the following TRS is considered.

foo(0(x0)) 0(s(p(p(p(s(s(s(p(s(x0))))))))))
foo(s(x0)) p(s(p(p(p(s(s(p(s(s(p(s(foo(p(p(s(s(p(s(bar(p(p(s(s(p(s(x0))))))))))))))))))))))))))
bar(0(x0)) 0(p(s(s(s(x0)))))
bar(s(x0)) p(s(p(p(s(s(foo(s(p(p(s(s(x0))))))))))))
p(p(s(x0))) p(x0)
p(s(x0)) x0
p(0(x0)) 0(s(s(s(s(x0)))))

Proof

1 String Reversal

Since only unary symbols occur, one can reverse all terms and obtains the TRS
0(foo(x0)) s(p(s(s(s(p(p(p(s(0(x0))))))))))
s(foo(x0)) s(p(s(s(p(p(bar(s(p(s(s(p(p(foo(s(p(s(s(p(s(s(p(p(p(s(p(x0))))))))))))))))))))))))))
0(bar(x0)) s(s(s(p(0(x0)))))
s(bar(x0)) s(s(p(p(s(foo(s(s(p(p(s(p(x0))))))))))))
s(p(p(x0))) p(x0)
s(p(x0)) x0
0(p(x0)) s(s(s(s(0(x0)))))

1.1 Bounds

The given TRS is match-bounded by 2. This is shown by the following automaton.