rd International Symposium on Multiple Valued Logic. Sacramento, CA, May 1993 Proceedings. (IEEE Press, Los Alamitos, 1993) pp. 208–213 Systematic Construction of Natural Deduction Systems for Many-valued Logics Matthias Baaz∗ Christian G. Fermüller† Richard Zach† Technische Universität Wien, Austria Abstract A construction principle for natural deduction systems for arbitrary finitely-many-valued first order logics is exhibited. These systems are systematically obtained from sequent calculi, which in turn can be automatically extracted from the truth tables of the logics under consideration. Soundness and cut-free completeness of these sequent calculi translate into soundness, completeness and normal form theorems for the natural deduction systems. 1 Introduction The study of natural deduction systems for manyvalued logics can be motivated by the following two issues: (1) Many-valued logics provide a general framework for the investigation of properties of classical (two-valued) sytems. (2) A general construction of sound and complete natural deduction calculi leads to an adequate syntactical (proof-theoretic) characterization of many-valued logics for which one wants to emphasize the rôle of a particular truth value. (For standard logics, such as the families of Gödel und Lukasiewicz logics, one usually considers such distinguished truth values.) We consider finitely-many-valued first order logics with arbitrary truth-functional connectives and distribution quantifiers (see Definition 2.2). A natural deduction derivation for a logic with the truth values {v1, . . . , vm} is defined as a derivation Γ1 | . . . | Γm−1.... Γm where Γi (1 ≤ i ≤ m) are sets of formulas (Γ1 | . . . | Γm−1 represents the assumptions, Γm is the conclu- ∗Technische Universität Wien, Institut für Algebra und Diskrete Mathematik E118.2, Wiedner Hauptstrasse 8–10, A1040 Wien, Austria, baaz@logic.tuwien.ac.at †Technische Universität Wien, Institut für Computersprachen E185.2, Resselgasse 3/1, A-1040 Wien, Austria, {chrisf, zach}@logic.tuwien.ac.at sion.) Each position i corresponds to one of the truth values, vm is the distinguished truth value. The intended meaning is as follows: Derive that at least one formula of Γm takes the value vm under the assumption that no formula in Γi takes the value vi (1 ≤ i ≤ m− 1). Our starting point for the construction of natural deduction systems are sequent calculi. (A sequent is a tuple Γ1 | . . . | Γm, defined to be satisfied by an interpretation iff for some i ∈ {1, . . . ,m} at least one formula in Γi takes the truth value vi.) For each pair of an operator 2 or quantifier Q and a truth value vi we construct a rule introducing a formula of the form 2(A1, . . . , An) or (Qx)A(x), respectively, at position i of a sequent. The resulting calculi are shown to be sound and cut-free complete by Schütte's reduction tree method. Every sequent rule introducing a formula at a nondistinguished position is converted into an elimination rule; the sequent rule introducing a formula at the distinguished position is transformed into an introduction rule (in the sense of natural deduction). Any natural deduction derivation can be translated into a derivation of the corresponding sequent calculus. On the other hand, any cut-free sequent calculus proof translates into a normal natural deduction derivation. (Here normal means that for no branch of the proof tree an elimination follows an introduction; this excludes maximal segments in the sense of Prawitz [1971].) Consequently, the natural deduction sytems are sound and complete and every derivation can be transformed into a normal derivation. Such derivations consist of "analytical" paths. 2 Preliminaries 2.1. Definition A language L for a logic L consists of: (1) free variables, (2) bound variables, (3) predicate symbols, (4) propositional connectives, (5) quantifiers, and (6) auxiliary symbols: "(", ")", "," We use a, b, c, . . . to denote free variables; x, y, z, . . . to denote bound variables; P , Q, R, . . . to denote predicate symbols; 2 to denote connectives; and Q to denote quantifiers, all possibly indexed. 2.2. Definition A matrix L for a language L is given by: (1) a nonempty set of truth values V = {v1, . . . , vm} of size m, (2) an abstract algebra V with domain V of appropriate type: For every n-place connective 2 of L there is an associated truth function 2:V n → V , (3) for every quantifier Q, an associated truth function Q:℘(V ) \ {∅} → V A language and a matrix for it together fully determine a logic L. L is said to be m-valued. The intended meaning of a truth function for a propositional connective is obvious and perfectly analogous to the two-valued case. A truth function for a quantifier is a mapping from nonempty sets of truth values to truth values: given a quantified formula (Qx)F (x), such a set of truth values describes the situation where the instances of F take exactly the truth values in this set as values under a given interpretation. 2.3. Example The matrix for the three-valued Gödel logic G3 consists of: (1) The set of truth values V = {f, ∗, t} (2) The truth functions for the connectives, e.g.: ¬ t f ∗ ∗ f t ∨ t ∗ f t t t t ∗ t ∗ ∗ f t ∗ f ⊃ f ∗ t f t t t ∗ f t t t f ∗ t (3) The truth functions for the quantifiers ∀ and ∃ (generalized ∧ and ∨): ∀ ( {t} ) = t ∃ ( {t} ) = t ∀ ( {t, ∗} ) = ∗ ∃ ( {t, ∗} ) = t ∀ ( {t, f} ) = f ∃ ( {t, f} ) = t ∀ ( {t, ∗, f} ) = f ∃ ( {t, ∗, f} ) = t ∀ ( {∗} ) = ∗ ∃ ( {∗} ) = ∗ ∀ ( {∗, f} ) = f ∃ ( {∗, f} ) = ∗ ∀ ( {f} ) = f ∃ ( {f} ) = f 2.4. Definition An interpretation M is a mapping of all free variables to elements of a given domain D, and of predicate symbols to functions of type Dn → V . A valuation valM is a mapping that extends the interpretation to formulas via the truth functions given in the matrix. We only give the precise definition of the valuation function for a quantified formula: valM ( (Qx)G(x) ) = Q (⋃ d∈D valM(d/a)G(a) ) , where a is a new free variable, and M(d/a) is defined as the interpretation equal to M, except that M(d/a)a = d. 3 Sequent calculi Sequent calculi for classical logic were introduced by Gentzen [1934] and were later generalized to the many-valued case by Schröter [1955], Rousseau [1967], and others. More recently, equivalent formulations for tableaux calculi were given (see, e.g., Carnielli [1987] or Hähnle [1991]). The method used here can also be used to obtain calculi for transformation into clause form for many-valued resolution (see Baaz and Fermüller [1992]). 3.1. Definition An (m-valued) sequent is an mtuple of finite sets Γi of formulas, denoted thus: Γ1 | Γ2 | . . . | Γm For convenience, we will abbreviate Γ ∪ ∆ by Γ,∆; Γ ∪ {F} by Γ, F ; and sometimes Γ1 | . . . | Γm by | Γl |ml=1. We say that F stands (or occurs) at place i, if F ∈ Γi; vi then is the truth value corresponding to place i. 3.2. Definition An interpretation M is said to satisfy a sequent Γ1 | . . . | Γm, if there is an i (1 ≤ i ≤ m) and a formula F ∈ Γi, s.t. valM(F ) = vi. A sequent is called valid, if it is satisfied under every interpretation. 3.3. Definition An introduction rule for a connective 2 at place i in the logic L is a schema of the form: 〈 Γ j1 ,∆ j 1 | . . . | Γ jm,∆jm 〉 j∈I Γ1 | . . . | Γi,2(A1, . . . , An) | . . . | Γm 2:i where the arity of 2 is n, I is a finite set, Γl = ⋃ j∈I Γ j l , ∆jl ⊆ {A1, . . . , An} and the following condition holds: Let M be an interpretation. Then the following are equivalent: (1) 2(A1, . . . , An) takes the truth value vi under M. (2) For j ∈ I, M satisfies the sequents ∆j1 | . . . | ∆jm. It should be stressed that the introduction rules for a connective at a given place are far from being unique: Let the expression Avl denote the statement "A takes the truth value vl". Then every introduction rule for 2(A1, . . . , An) at place i corresponds to a conjunction of disjunctions of some Avl which is true iff 2(A1, . . . , An) takes the truth value vi (namely, ∧ j∈I ∨m l=1 ∨ A∈∆j l Avl). Any such conjunctive normal form for 2(A1, . . . , An)vi will do. In particular, the truth table for 2 immediately yields a complete conjunctive normal form, the corresponding rule is as in Definition 3.3, with: I ⊆ V n is the set of all n-tuples j = (w1, . . . , wn) of truth values such that 2(w1, . . . , wn) 6= vi; and ∆jl = {Ak | 1 ≤ k ≤ n, vl 6= wk}. 3.4. Example Consider the implication in threevalued Gödel logic G3 given in Example 2.3. The conjunctive forms (A ⊃ B)f = (A∗ ∨At) ∧Bf (A ⊃ B)∗ = At ∧B∗ (A ⊃ B)t = (Af ∨A∗ ∨Bt) ∧ (Af ∨B∗ ∨Bt) yield the following introduction rules: Γ | ∆,A | Π,A Γ ′, B | ∆′ | Π ′ Γ, Γ ′, A ⊃ B | ∆,∆′ | Π,Π ′ ⊃:f Γ | ∆ | Π,A Γ ′ | ∆′, B | Π ′ Γ, Γ ′ | ∆,∆′, A ⊃ B | Π,Π ′ ⊃:∗ Γ,A | ∆,A | Π,B Γ ′, A | ∆′, B | Π ′, B Γ, Γ ′ | ∆,∆′ | Π,Π ′, A ⊃ B ⊃:t 3.5. Definition An introduction rule for a quantifier Q at place i in the logic L is a schema of the form:〈 Γ j1 ,∆ j 1 | . . . | Γ jm,∆jm 〉 j∈I Γ1 | . . . | Γi, (Qx)A(x) | . . . | Γm Q:i where I is a finite set, Γl = ⋃ j∈I Γ j l , ∆ j l ⊆ {A(a1), . . . , A(ap)} ∪ {A(t1), . . . , A(tq)}, the al are metavariables for free variables (the eigenvariables of the rule) satisfying the condition that they do not occur in the lower sequent, the tk are metavariables for terms, and the following condition holds: Let M be an interpretation. Then the following are equivalent: (1) (Qx)A(x) takes the truth value vi under M. (2) For all d1, . . . , dp ∈ D, there are terms t′1, . . . , t′q s.t. for all j ∈ I, M(d1/a1, . . . , dp/ap) satisfies ∆′ j 1 | . . . | ∆′ j m where ∆ ′j l is obtained from ∆ j l by instantiating the term variable tk with t′k (1 ≤ k ≤ q). The truth function for a quantifier Q immediately yields introduction rules for place i in a way similar to the method described above for connectives: Let I = {j ⊆ {v1, . . . , vm} | Q(j) 6= vi}, then the rule is given as in Definition 3.5, with ∆jl = {A(ajw) | w ∈ j, w 6= vl} ∪ {A(tj) | vl ∈ V \ j}. Again, it should be stressed that in general this is not the only possible rule. 3.6. Example Consider the universal quantifier ∀ in three-valued Gödel logic G3 given in Example 2.3. Intuitively, (∀x)A(x) takes the value f , if A(t) is false for some t; t, if A(a) is true for all a; and ∗, if A(t) takes the value ∗ for some t and A(a) never takes the value f . We obtain the following rules: Γ,A(t) | ∆ | Π,A Γ, (∀x)A(x) | ∆ | Π ∀:f Γ | ∆ | Π,A(a) Γ | ∆ | Π, (∀x)A(x) ∀:t Γ | ∆,A(a) | Π,A(a) Γ ′ | ∆′, A(t) | Π ′ Γ, Γ ′ | ∆,∆′, (∀x)A(x) | Π,Π ′ ∀:∗ 3.7. Definition A sequent calculus for a logic L is given by: (1) Axioms of the form: A | . . . | A, where A is any formula, (2) For every connective 2 and every truth value vi an introduction rule 2:i, (3) For every quantifier Q and every truth value vi an introduction rule Q:i, (4) Weakening rules for every place i: Γ1 | . . . | Γi | . . . | Γm Γ1 | . . . | Γi, A | . . . | Γm (5) Cut rules for every two truth values vi 6= vj : Γ1 | . . . | Γi, A | . . . | Γm ∆1 | . . . | ∆j , A | . . . | ∆m Γ1,∆1 | . . . | Γm,∆m A sequent is provable in a given sequent calculus, if there is an upward tree of sequents s.t. every topmost sequent is an axiom and every other sequent is obtained from the ones standing immediately above it by an application of one of the rules. 3.8. Theorem (Soundness) For every sequent calculus in the sense of Definition 3.7 the following holds: If a sequent is provable, then it is valid. Proof. By induction on the length of proofs (see Baaz et al. [1993]). 2 3.9. Theorem (Completeness) For every sequent calculus in the sense of Definition 3.7 the following holds: If a sequent is valid, then it is provable without cuts from atomic axioms. Proof. By the method of reduction trees, due to Schütte (see Baaz et al. [1993]). 2 4 Natural deduction systems Gentzen [1934] formulated natural deduction for intuitionistic logic as the system NJ. In correspondence with the intuitionistic sequent calculus LJ, where the right side of a sequent is restricted to at most one formula, NJ deals with inferences of one conclusion from a set of assumptions. At the application of rules, assumptions of a certain form can be cancelled in parts of the proof. A proof of a formula is a deduction tree where all assuptions have been cancelled. Natural deduction for classical logic NK is obtained from NJ by adding tertium non datur. Alternatively, one can drop the restriction to one formula in the conclusion and allow sets of formulas (cf. Parigot [1992]). We generalize this classical multi-conclusion system of natural deduction to the m-valued case. 4.1. Definition Let the 2-introduction rules at place i be given as in Definition 3.3. The (natural deduction) introduction rule 2:I for 2 is given by:〈 Γ j1 , [∆ j 1] | . . . | Γ j m−1, [∆ j m−1] Γ jm,∆ j m 〉 j∈I Γm,2(A1, . . . , An) The elimination rule 2:Ei for 2 at place i < m is given by: MP Γ ′m,2(A1, . . . , An) 〈 | Γ jl , [∆ j l ] | m−1 l=1 Γ jm,∆ j m 〉 j∈I Γm, Γ ′ m where MP denotes the major premise of the form: Γ ′1, [2(. . .)] | . . . | Γ ′i | . . . | Γ ′m−1, [2(. . .)] Γ ′m,2(. . .) The formulas in square brackets are those which can be cancelled at this inference. 4.2. Example The introduction rule for⊃ in the logic G3 is: Γ, [A] | ∆, [A] Π,B Γ ′, [A] | ∆′, [B] Π ′, B Π,Π ′, A ⊃ B The elimination rule at place ∗ is: Γ, [A ⊃ B] | ∆ Π,A ⊃ B Γ ′′ | ∆′′ Π ′, A Γ ′′ | ∆′′, [B] Π ′′ Π,Π ′,Π ′′ The elimination rule at place f is: Γ | ∆, [A ⊃ B] Π,A ⊃ B Γ ′′ | ∆′′, [A] Π ′, A Γ ′′, [B] | ∆′′ Π ′′ Π,Π ′,Π ′′ 4.3. Definition Let the Q-introduction rules at place i be given as in Definition 3.5. The (natural deduction) introduction rule Q:I for Q is given by:〈 Γ j1 , [∆ j 1] | . . . | Γ j m−1, [∆ j m−1] Γ jm,∆ j m 〉 j∈I Γm, (Qx)A(x) The elimination rule Q:Ei for Q at place i < m is given by: MP Γm, (Qx)A(x) 〈 | Γ jl , [∆ j l ] | m−1 l=1 Γ jm,∆ j m 〉 j∈I Γm, Γ ′ m where MP denotes the major premise of the form: Γ ′1, [(Qx)A(x)] | . . . | Γ ′i | . . . | Γ ′m−1, [(Qx)A(x)] Γm, (Qx)A(x) The eigenvariables in ∆jl must not occur in Γ1, Γ ′ 1, . . . , Γm, Γ ′ m nor in (Qx)A(x). 4.4. Definition A natural deduction system for a logic L is given by: (1) Assumptions of the form | A |m−1l=1 where A is any formula, (2) For every connective 2 an introduction rule 2:I as well as an elimination rule 2:Ei for every truth value vi 6= vm; (3) For every quantifier Q an introduction rule Q:I as well as an elimination rule Q:Eifor every truth value vi 6= vm; (4) The weakening rule: Γ1 | . . . | Γm−1 Γm Γm, A w Weakenings are considered as introductions. In the classical case, a derivation of a formula F from an assumption A has the intuitive meaning of: assuming A holds, we can deduce F . Viewed truthfunctionally, this means: assuming that A is true, i.e., not false, then F is true as well. The generalization to the many-valued case is as follows: Given a derivation of F from the assumption A1 | . . . | Am−1: if Ai does not take the truth value vi (1 ≤ i ≤ m− 1), then F takes the truth value vm. 4.5. Definition A natural deduction derivation is defined inductively as follows: (1) Let A be any formula. Then | A |m−1l=1 A is a derivation of A from the assumption | A |m−1l=1 (an initial derivation). (2) If Dj are derivations of Γ jm,∆ j m from the assumptions Γ j1 ,∆ j 1 | . . . | Γ j m−1,∆ j m−1, and〈 Γ j1 , [∆ j 1] | . . . | Γ j m−1, [∆ j m−1] Γ jm,∆ j m 〉 j∈J Γm is an instance of a deduction rule (the ∆ji may be empty) satisfying the eigenvariable conditions, then 〈Dj〉j∈J Γm is a derivation of Γm from the assumptions⋃ j∈I Γ j 1 | . . . | ⋃ j∈I Γ j m−1. The formulas in ∆ j i which do not occur in ⋃ j∈I Γ j i are said to be cancelled at this inference. 4.6. Definition In an elimination, the premises (sets of formulas) containing the formula to be eliminated are called major premises, the other premises are called minor premises. We call a formula occurence A (1) the conclusion formula of an introduction, if it is the formula being introduced, (2) a premise formula of an introduction, if it is one of the formulas in ∆jm in that introduction, (3) the major premise formula of an elimination, if it is the formula being eliminated, (4) a minor premise formula of an elimination, if it is among the formulas in ∆jm in that elimination, (5) a cancelled assumption formula of an elimination, if it stands immediatley below an assumption which contains the formulas in ∆jl (1 ≤ j ≤ m−1) being cancelled at that elimination. A formula occurence A is said to follow A′, if both are of the same form and A′ stands immediately above A. 4.7. Theorem (Soundness) If a set of formulas Γm can be derived from the assumptions Γ1 | . . . | Γm−1, then the following holds for every interpretation M: If no formula in Γi (i < m) evaluates to the truth value vi, then there is a formula in Γm that evaluates to vm. Proof. By inductive translation of a derivation D of Γm from Γ1 | . . . | Γm−1 to a sequent calculus proof of Γ1 | . . . | Γm (see Baaz et al. [1993]). 2 4.8. Remark Translating sequent rules for two-valued logic yield natural deduction elimination rules which differ from those given by Gentzen. However, Gentzen's rules can be obtained in a systematic way by a simplification of the constructed rules. The resulting schema falls outside of our definition of natural deduction rules. We demonstrate this simplification pars pro toto for the ∀-elimination rule. The classical version as given by Parigot [1992] is: Γ ∆, (∀x)A(x) ∆,A(t) The constructed rule is: Γ ∆, (∀x)A(x) Γ ′, [A(t)] ∆′ ∆,∆′ Taking {A(t)} for ∆′ and ∅ for Γ ′, we obtain Parigot's rule by disregarding the redundant right premise. 5 Normal derivations A maximum segment in the intuitionistic natural deduction calculus NJ is a sequence of formulas in a derivation that starts with an introduction and end with an elimination. In the classical, multi-conclusion system, it is a sequence starting with an introduction of a formula and ending in an elimination acting on the same formula. A maximum segment constitutes a redundancy in the proof. In NJ, and also in multivalued natural deduction, there are always proofs without such redundancies (see Prawitz [1971]). 5.1. Definition A sequence A1, . . . , Ar of occurrences of one and the same formula is called a maximum segment, if A1 is the conclusion formula of an introduction, Aj+1 stands immediately below Aj , and Ar is the the major premise formula in an elimination. 5.2. Definition A normal derivation is a natural deduction derivation where no major premise of an elimination stands below an introduction. 5.3. Proposition A normal derivation contains no maximum segments. 5.4. Theorem Every cut-free sequent calculus proof of S = Γ1 | . . . | Γm can be translated into a normal natural deduction derivation of Γm from the assumptions Γ ′1 | . . . | Γ ′m−1, where Γ ′l ⊆ Γl (1 ≤ l ≤ m− 1). Proof. See Baaz et al. [1993]. 2 5.5. Corollary (Completeness) Natural deduction systems are complete. Proof. By Theorems 3.9 and 5.4. 2 5.6. Corollary (Normal Form Property) For every natural deduction derivation, there exists a normal natural deduction derivation of the same set of formulas from (a subset of) the same assumptions. Proof. If there is a derivation of Γm from Γ1 | . . . | Γm−1, then by Theorem 4.7 there is a cut-free sequent calculus proof of Γ1 | . . . | Γm, whose translation yields a normal derivation. 2 5.7. Definition A path in a natural deduction derivation is a sequence of occurences of formulas A1, . . . , Ar s.t. (1) A1 is either (a) a formula standing immediately below an assumption or (b) is the conclusion formula of an introduction without premise formulas (e.g., weakenings); (2) Ar is either (a) an end formula of the derivation or (b) a minor premise formula of an elimination or (c) a major premise formula of an elimination without cancelled assumption formulas, and (3) Aj+1 (1 ≤ j ≤ r − 1) is either (a) a cancelled assumption formula of an elimination rule, if Aj is the major premise formula of that elimination, or (b) the conclusion formula of an introduction if Aj is a premise formula of that rule, or (c) follows Aj . 5.8. Proposition A path in a normal derivation can be divided into three (possibly empty) parts: (1) The analytical part A1, . . . , Ap, where each formula is the major premise formula of an elimination and stands immediately below an assumption; Aj is a subformula of Aj−1 (2 ≤ j ≤ p). (2) The minimum part Ap+1, . . . , Aq; Aj is equal to Aj+1 (p ≤ j ≤ q). (3) The synthetical part Aq+1, . . . , Ar; Aq+1 is the conclusion formula of an introduction with premise formula Aq; Aj−1 is a subformula of Aj (q + 1 ≤ j ≤ r). 6 Conclusion We emphasize the fact that the construction of the logical calculi as well as the translations given are purely systematic and can in principle be automatised. Moreover, soundness, completeness and normal form theorems for the systems considered are derived in a uniform way. It remains to be investigated for which collections of operators one can achieve strong normalisation (i.e., normal form transformations with Church-Rosser property) according to some reasonable definition. References Baaz, M. and C. G. Fermüller. [1992] Resolution for many-valued logics. In Proc. LPAR'92, LNAI 624, 107–118, Springer, Berlin. Baaz, M., C. G. Fermüller, and R. Zach. [1993] Systematic construction of natural deduction systems for many-valued logics: Extended report. TUW–E185.2–BFZ.1–93, Technische Universität Wien. Carnielli, W. A. [1987] Systematization of finite many-valued logics through the method of tableaux. J. Symbolic Logic, 52(2), 473–493. Gentzen, G. [1934] Untersuchungen über das logische Schliessen I–II. Math. Z., 39, 176–210, 405–431. Hähnle, R. [1991] Uniform notation of tableaux rules for multiple-valued logics. In Proc. Intl. Symposium on Multiple-valued Logic, 238–245. Parigot, M. [1992] λμ-Calculus: an algorithmic interpretation of classical natural deduction. In Proc. LPAR'92, LNAI 624, 190–201, Springer, Berlin. Prawitz, D. [1971] Ideas and results in proof theory. In Proc. Second Scandinavian Logic Symposium, J. E. Fenstad (ed.), 235–307, North-Holland, Amsterdam. Rousseau, G. [1967] Sequents in many valued logic I. Fund. Math., 60, 23–33. Schröter, K. [1955] Methoden zur Axiomatisierung beliebiger Aussagenund Prädikatenkalküle. Z. Math. Logik Grundlag. Math., 1, 241–251.