Implementing modal and relevance logics in a logical framework