It has been shown that linear logic can be successfully used as a framework for both specifying proof systems for a number of logics, as well as proving fundamental properties about the specified systems. This paper shows how to extend the framework with subexponentials in order to declaratively encode a wider range of proof systems, including a number of non-trivial proof systems such as multi-conclusion intuitionistic logic, classical modal logic S4, intuitionistic Lax logic, and Negri's labelled proof systems for different modal logics. Moreover, we propose methods for checking whether an encoded proof system has important properties, such as if it admits cut-elimination, the completeness of atomic identity rules, and the invertibility of its inference rules. Finally, we present a tool implementing some of these specification/verification methods. 2 An Extended Framework for Specifying and Reasoning about Proof Systems since exponentials in linear logic are not canonical [23, 7] , one can construct linear logic proof systems containing as many subexponentials as one needs. This feature made it possible to declaratively encode a wide range of proof systems, such as a multi-conclusion proof system for intuitionistic logic [16] . In addition, since the proposed encoding is natural and direct, we were able to use the rich linear logic meta-level theory in order to reason about the specified systems in an elegant and simple way. The contribution of this paper is three-fold. First, in Section 4, we demonstrate how to declaratively specify proof systems with more involved structural and logical inferences rules using linear logic theories with subexponentials. We encode proof systems that have structural restrictions that are much more interesting and challenging than those of the systems specified in [26] . Besides the multi-conclusion system for intuitionistic logic specified in our previous work, we specify proof systems for intuitionistic lax logic [10], focused intuitionistic logic LJQ * , classical modal logic S4 as well as Negri's labelled proof systems for different modal logics. These examples provide evidence that linear logic with subexponentials can be successfully used as a framework for a number of proof systems including systems for modal logics. Our second contribution, in Section 5, follows and enhances the ideas presented in [19] . We provide sufficient conditions for guaranteeing three properties of systems specified using subexponentials: (1) the admissibility of the cut-rule; (2) the completeness of the system when using only atomic instances of the initial rule; and (3) the invertibility of each inference rule. The main difference from what is presented here and the work developed in [19] is the establishment of some criteria for permutation of rules. Such analysis is needed for checking whether cuts can be transformed into principal cuts. Since our framework enables the encoding of much more complicated proof systems, the behavioral analysis is more involved and it leads to more general conditions when compared to [19] . Finally, we have implemented a tool, described in Section 6, that accepts a linear logic with subexponentials specification and automatically checks whether principals cuts can be reduced to atomic cuts and whether initial rules can be atomic only. Our tool is able to show that most of the systems mentioned 1 above satisfy these conditions. Furthermore it also can check cases for when the cut-rule can be permuted over an introduction rule and when an introduction rule can permute over another introduction rule. Such analysis can greatly help to discover corner cases for when the reduction of a proof with cuts into a proof with principal cuts only is not immediate. This paper is structured as follows. Section 2 introduces the proof system for linear logic with subexponentials, called SELLF, which is the basis of the proposed logical framework. In Section 3, we describe how to encode a proof system in our framework. Section 4 describes the encoding of a number of proof systems, namely, the proof system G1m for minimal logic [33], the multi-conclusion proof system for intuitionistic logic mLJ [16], the focused proof system LJQ * for intuitionistic logic [8], a proof system for the classical modal logic S4, a proof system for intuitionistic lax logic [10] , and the labelled proof system G3K for modal logics [21] . Section 5 introduces the conditions for verifying whether an encoded proof system satisfies the properties mentioned before, which can be checked using our tool described in Section 6. Finally, in Sections 7 and 8, we end by discussing related and future work. This is an improved and expanded version of the workshop paper [26] . 1 The exception is LJQ * , whose cut-elimination argument is quite involved. Although we assume that the reader is familiar with linear logic, we review some of its basic proof theory. Literals are either atomic formulas (A) or their negations (A ⊥ ). The connectives ⊗ and and their units 1 and ⊥ are multiplicative; the connectives ⊕ and & and their units 0 and are additive; ∀ and ∃ are (first-order) quantifiers; and ! and ? are the exponentials (called bang and question mark, respectively). We shall assume that all formulas are in negation normal form, meaning that all negations have atomic scope. Due to the exponentials, one can distinguish in linear logic two kinds of formulas: the linear ones whose main connective is not a ? and the unbounded ones whose main connective is a ?. The linear formulas can be seen as resources that can only be used once, while the unbounded formulas represent unlimited resources that can be used as many times as necessary. This distinction is usually reflected in syntax by using two different contexts in linear logic sequents ( Θ : Γ), one (Θ) containing only unbounded formulas and another (Γ) with only linear formulas [1]. Such distinction allows to incorporate structural rules, i.e., weakening and contraction, into the introduction rules of connectives, as done in similar presentations for classical logic, e.g., the G3c system in [33] . In such presentation, the context (Θ) containing unbounded formulas is treated as a set of formulas, while the other context (Γ) containing only linear formulas is treated as a multiset of formulas. It turns out that the exponentials are not canonical [7] with respect to the logical equivalence relation. In fact, if, for any reason, we decide to define a blue and red conjunctions (∧ b and ∧ r respectively) with the standard classical rules: then it is easy to show that, for any formulas A and B, A ∧ b B ≡ A ∧ r B. This means that all the symbols for classical conjunction belong to the same equivalence class. Hence, we can choose to use as the conjunction's canonical form any particular color, and provability is not affected by this choice. However, the same behavior does not hold with the linear logic exponentials. In fact, suppose we have red ! r , ? r and blue ! b , ? b sets of exponentials with the standard linear logic rules:
Nigam and Miller in [26] showed that it is possible to capture a wider range of proof systems (sequent, natural deduction, tableaux, etc) by a generalization of the style of specifications presented in this paper. And in REF Nigam, Pimentel and Reis proposed using focused linear logic with subexponentials as the meta-logic for specifying proof systems, together with a generalization of the notion of coherence presented in this paper. But it is worthy noticing that, while subexpontentials allow for the specification of systems at the level of full completeness of derivations, finding general conditions for verifying properties becomes a tricky task.
An extended framework for specifying and reasoning about proof systems
J. Log. Comput.
J. Log. Comput.
Mathematics Computer Science