<<

Three Deductive Systems of Classical (or Boolean) Type and Their Denotational-Semantic Completeness

Ken Akiba

Virginia Commonwealth University, Richmond, Virginia, USA [email protected]

Abstract Classical (or Boolean) type theory is a non-standard type theory that allows for the type (A → –) → – ⊢ A, the type counterpart of the double- elimination rule, where A is any type and – is absurdity type. This paper considers three deductive systems of classical type theory: (1) a λ- in the form called λK-calculus; (2) classical double (LK2); and (3) LK2’s natural deduction version, classical double natural deduction (NK2). A denotational is given to each calculus. The semantics have a common domain structure, called the infinitely nested Boolean structure, which divides each type domain into infinitely many ranks, each of which forms a Boolean . Absurdity type – is identified with the type of values, and the notions of semantic consequence are also defined in terms of truth values. Each calculus is proved sound and complete with respect to its semantics. In the process, this paper aims to give a definitive answer to the outstanding question of how the proof-annotated natural deduction and sequent calculus for classical propositional can be interpreted from the viewpoint of proofs (or programs)-as-terms ( (or formulas)-as-types, or the Curry-Howard correspondence). Keywords: Type theory; Classical (or Boolean) type theory; λ-calculus; λµ-calculus; Natural deduction; Sequent calculus; Curry-Howard correspondence; Propositions (or for- mulas) as types; Proofs (or programs) as terms; ; Double-negation elimina- tion; Infinitely nested Boolean structure; Type reduction; ; Com- pleteness; Generalized quantifier theory

1 Introduction

Classical type theory is the type theory that allows for the (A → –) → – ⊢ A, where A is any type and – is absurdity type. This rule is the type counterpart of the double- negation elimination rule (where ¬A = A → –), the signature inference rule of classical logic. The standard logic of type , minimal or intuitionistic logic, does not have this rule. Classical type theory, thus, is a non-standard type theory. However, the ‘classical type theory’ can be used in other contexts to refer to the traditional type theory, say Church’s or Curry’s type theory. To distinguish it from such a type theory, classical type theory of our sense may also be called Boolean type theory. The most famous and influential deductive system of classical type theory to date is Parigot’s λµ-calculus [9]. λµ-calculus, however, is not entirely intuitive. If you start with each deduction rule in, say, the standard classical natural deduction or the standard classical sequent calculus, and prefixed each in a proof with an encoding of its proof indicating how it was derived, the resulting system of proof-proposition pairs will not exactly be λµ-calculus. Among other things, λµ-calculus involves the distinction between λ- and µ-variables that cannot be made immediate sense of in this approach. In the next section of this paper, we present three calculi of classical type theory, two in natural deduction and one in sequent calculus, which are Classical Type Theory Akiba all perfect in this respect. The first is called λK-calculus, the second is called classical double sequent calculus (LK2), and the third is the natural deduction version of the second, called classical double natural deduction (NK2). The last two are so called because their terms have types that are essentially of the same forms as the terms themselves (for instance, if term M is of type A and N of type B, then term M → N will be of type A → B). After Section 2, we will give denotational semantics to the three calculi. Per the Curry- Howard correspondence (see, e.g., [14]), the calculi ought to be understood as calculi of typed terms instead of (or as well as) those of proof-annotated propositions, and semantics are given accordingly. Those semantics have the common core, which is the same domain structure we call the infinitely nested Boolean structure. It divides each type domain into infinitely many ranks, each of which forms a . Absurdity type – is identified with the type of truth values. The double-negation elimination, as a type inference, then is interpreted as a move from type (A → –) → –, rank n, to type A, rank n+1. The notions of semantic consequence are defined also in terms of truth values, falsity in particular. In Section 4, each calculus is proved sound and complete with respect to its semantics. Even though our formulation of classical λ-calculus as λK-calculus is not without its own merits, we are inclined to think that our formulation of classically-typed sequent calculus as classical double sequent calculus (LK2) is of particular significance. Unlike previous formu- lations of sequent calculus in terms of λ (such as [7], which deals only with minimal logic), our formulation is independent of λ-calculus. This seems more natural because unlike natural deduction, propositional sequent calculus does not involve subproofs and genuine variables. Put simply, while [[(λxAMB)A→B]]ρ is usually the total that gives the value [[MB]]ρ for the [[xA]]ρ and other values [[(M[xA ∶= NA])B]]ρs for the other [[NA]]ρs accordingly, [[(MA → NB)A→B]]ρ is a (very) partial function that gives the value [[NB]]ρ (or something like it) for the argument [[MA]]ρ but is undefined for all the other arguments in- dependent of [[MA]]ρ. Whereas natural deduction is paired with λ-calculus and Hilbert-type axiomatic systems are with in the Curry-Howard correspondence, the third of the three main formalizations of logic (see, e.g., [15]), sequent calculus, has never been quite understood from that point of view. We hope that our of typed sequent cal- culus as having terms and types of essentially the same form is correct and contributes to a better understanding of sequent calculus in general from the viewpoint of the Curry-Howard correspondence.

2 λK, LK2, and NK2

λK-calculus, LK2, classical double sequent calculus, and its natural deduction version NK2 involve the same . As usual, there are two kinds of types: base (or atomic) types, denoted as X below, and function types. The types are defined thus: A ∶∶= X S – S A → A What is noteworthy here is the inclusion of – as a (or the) type constant. – is called absurdity type. Throughout this paper, ¬A, whether it appears as a term or as a type, in the language or metalanguage, is uniformly taken as the abbreviation of A → –. All three calculi we present are actually their {→, –}-fragments. However, since they are classical calculi, other operators such as ∧ and ∨ can be defined easily in terms of → and – (e.g., A ∧ B =df ¬(A → ¬B) and A ∨ B =df ¬A → B). We won’t consider quantifiers ∀ and ∃ in this paper.

2 Classical Type Theory Akiba

2.1 λK-Calculus

λK-calculus is a straightforward classical of minimal logic in natural deduction, which can be understood from the propositions (or formulas)-as-types viewpoint as the standard simply-typed λβ-calculus in the natural deduction formulation. λK adds the double-negation elimination rule to the calculus. The deductive system closest to ours is probably Rehof and Sørensen’s [11] λ∆-calculus.

2.1.1 Terms of λK

All terms of λK, LK2, and NK2 are subscripted with their types. The following is the definition of a term MA (of type A) in λK-calculus:

M ∶∶= x S(M M ) S(λx M ) S(↓ M ) A A A→B A B A B A→B ((A→–)→–)→A (A→–)→– A where x is a variable. Here the same Roman capitals in the subscripts in the same item are the same types. Since A → – can be abbreviated as ¬¬A, ((A → –) → –) → A in the last item can be abbreviated as ¬¬A → A. Furthermore, this subscript is often simply omitted in what follows.

2.1.2 Deduction Rules of λK

λK-calculus consists of the following five deduction rules:

[xA] MA→B NA ⋮ ((λxAMB) NA) (Ap) A→B B (λE) (MA→BNA) M (M[x ∶= N ]) B B (λI) A A B (λxAMB)A→B

M¬¬A (N¬A(↓M¬¬A) ) (↓I) A – (↓E) (↓M ) ¬¬A A (M¬¬AN¬A)–

[xA] means that the premise xA may be discharged at the introduction of λxA. (M[xA ∶= NA])B is the same as MB except that all occurrences of variable xA in MB is replaced with occurrences of term NA. For any Γ of terms and any term NB,Γ ⊢λK NB iff NB is deducible from Γ by means of the above five rules. λ-introduction (λI) and λ-elimination (λE) are more often called abstraction and β-reduction, respectively. Among the five rules, the first three, i.e., application (Ap), (λI), and (λE) are the standard deduction rules of the simply-typed λβ-calculus. (Ap) and (λI) can be considered the proof-annotated versions of the →-elimination and -introduction rules in minimal logic. (↓ I), from that viewpoint, is the double-negation (¬¬) elimination rule. As proof-annotated classical deduction rules, (λE) and (↓E) may seem to be useless, as their premises and conclusions have the same propositions (i.e., subscripts B and –, respectively) although, as λ-calculus they have obvious roles. However, even as proof-annotated classical deduction rules they have the role of canceling the previous use of (λI) and (↓I), respectively. More on this feature, see Subsection 2.4 below.

3 Classical Type Theory Akiba

2.2 Classical Double Sequent Calculus (LK2) Just as classical type theory, sequent calculus has largely been left aside in the discussion of the Curry-Howard correspondence (even though there are well-known calclui that deal with sym- metry and duality of computation such as [1] and [4]). These two omissions are not unrelated. Among the three major systems of deduction, natural deduction, Hilbert-type (axiomatic) sys- tem, and sequent calculus, natural deduction corresponds to λ-calculus and Hilbert-type system corresponds to combinatory logic, but we have not yet found out what of type inference system sequent calculus corresponds to. But sequent calculus seems to be the most natural vehicle for classical inferences: classical inferences seem more natural than merely intuitionis- tic ones in the sequent calculus setting, for the calculus allows more than one succedent, thus creating the perfect symmetry between the antecedents and the succedents. In , the intuitionistic system seems crippled, unnaturally restricting the succedents into having at most one member. So constructing a sequent calculus of classical type theory and giving semantics go a long way toward a more complete understanding of the Curry-Howard correspondence. LK2 should be considered in that .

2.2.1 Terms of LK2

MA ∶∶= xA S –– S(MA → MB)A→B where xA are variables (of type A). –– is constant – of absurdity type –. Similarly, → is used here in two ways, as the constructor and as the term constructor. As you will see, this will not create any .

2.2.2 Deduction Rules of LK2 Here we present LK2 as a one-sided sequent calculus: what is ordinarily a member of the succedent is signaled as an ¬-formula. Generally, a one-sided sequent calculus can be considered an upside-down version of semantic tableaux [3] or truth trees [13]. (–) (¬) Γ, –– Γ,MA, (¬M A)¬A Γ, (¬M ) Γ,N Γ,M , (¬N ) A ¬A B (→) A B ¬B (¬→) Γ, (MA → NB)A→B Γ, (¬(MA → NB)A→B)¬(A→B) where Γ is a sequent1 of terms. Then ¬ introduced by the definition ¬A = A → – will be the classical negation. For any set S of sequents and any sequent ∆, S ⊢LK2 ∆ iff ∆ is deducible from S by means of the above four rules. What is remarkable about the four rules of LK2 above is that the proof part of each proof-proposition pair (or the term part of each term-type pair) in the rules has basically the same form as its proposition (type) part: hence ‘double’ and ‘2’ in its name (recall Gentzen’s [6] original classical sequent calculus was called LK). A proposition derived in the standard sequent calculus has its proof on its sleeves: we can tell how it was derived merely from the form of the proposition. LK2 is a formalization of this . It actually involves only two basic proof rules, (–) and (→). The other two rules are combinations of these two basic rules. We could add to the above rules the famous (Cut):

1Actually, just a set. This obviates the need of the so-called structural rules such as weakening, contraction, and exchange. However, throughout this paper we shall use the term ‘sequents’ for the sake of convenience.

4 Classical Type Theory Akiba

Γ,M Γ, (¬N )¬ A A A (Cut) Γ As is well known, however, (Cut) can be shown to be eliminable by a purely deductive con- sideration [6], and it is indeed eliminated in the aforementioned semantic tableaux and truth trees. Thus, we shall not include (Cut) in LK2.

2.3 Classical Double Natural Deduction (NK2) NK2 is the natural deduction version of LK2. As such, again, each of its terms has the type of the same form.

2.3.1 Terms of NK2 The terms of NK2 is the same as those of LK2.

2.3.2 Deduction Rules of NK2 The deduction rules of NK2 are as follows:

[MA] ⋮ (MA → NB) MA A→B (→E) N N B (→I) B (MA → NB)A→B

–– (¬(¬MA) ) (–E) ¬A ¬¬A (¬¬E) XA MA

In (–E), XA, just like MA and NB, is not a term but a metavariable (or term schema) to be replaced with any term. For any set Γ of terms and any term NB,Γ ⊢NK2 NB iff NB is deducible from Γ by means of the above four rules. While the equivalence between NK2 and LK2 is obvious (since Gentzen’s original NK and LK are equivalent), NK2 is a little difficult to interpret as a proof-annotated calculus. All the rules except (→ I) seem to cancel and erase the previous proof records; however, unlike (λE) and (↓ E) in λK, the propositions different from the premises are derived in the conclusions. The significance of NK2, thus, seems to reside solely in the fact that it is a natural deduction version of LK2. Consequently, NK2 will be treated very cursorily near the end of this paper.

2.4 Some Important Deductions in λK Before we begin considering the semantics of λK, LK2, and NK2 in the next section, let us examine a few deductions of λK which exhibit some important features.

[xA] ⋮ M ¬¬A (↓I) MB N¬A (↓M¬¬A) (1) (λI) (2) A (Ap) (λxAMB)A→B NA (N¬A(↓M¬¬A) ) (Ap) A – (↓E) ((λxAMB) NA) (M N ) A→B B (λE) ¬¬A ¬A – (M[xA ∶= NA])B

5 Classical Type Theory Akiba

(N¬A(↓(λx¬AM–)¬¬A) ) A – (↓E) (3) ((λx¬AM–)¬¬ N¬A) A – (λE) (M[x¬A ∶= N¬A])–

[x¬(A→B)]

[z → ][v ] ⋮ A B A (Ap) [y¬ ] (z → v ) M– B A B A B ( ) (λI) Ap ( ) (y¬B(zA→BvA) ) λx¬(A→B)M– ¬¬(A→B) B – (λI) (↓I) (λz (y (z v ) ) ) (↓(λx M ) ) A→B ¬B A→B A B – ¬(A→B) ¬(A→B) – ¬¬(A→B) A→B (Ap) ((λzA→B(y¬B(zA→BvA) ) ) (↓(λx¬(A→B)M–) ) ) B – ¬(A→B) ¬¬(A→B) → (4) A B – (↓E) ((λx M ) (λz (y (z v ) ) ) ) ¬(A→B) – ¬¬(A→B) A→B ¬B A→B A B – ¬(A→B) – (λE) (M[x ∶= (λz (y (z v ) ) ) ]) ¬(A→B) A→B ¬B A→B A B – ¬(A→B) – (λI) (λy¬B(M[x¬(A→B) ∶= (λzA→B(y¬B(zA→BvA) ) ) ]) ) B – ¬(A→B) – ¬¬B (↓I) (↓(λy¬B(M[x¬(A→B) ∶= (λzA→B(y¬B(zA→BvA) ) ) ]) ) ) B – ¬(A→B) – ¬¬B B (λI) (λx (↓(λy (M[x ∶= (λz (y (z v ) ) ) ]) ) ) ) A ¬B ¬(A→B) A→B ¬B A→B A B – ¬(A→B) – ¬¬B B A→B

Proofs (1) and (2) show how proofs involving → and ¬¬ are normalized in λK. Again, (λE) and (↓ E) do not derive new propositions but cancel the old, redundant proofs involving (λI) and (↓I) within the deductive system. Proofs (3) and (4) correspond to what Parigot [9] calls renaming and structural reduction, which, together with β-reduction (λE), constitute the three reduction rules of his λµ-calculus. In particular, (4) cancels the initial derivation of A → B by double-negation elimination on ¬¬(A → B) on the left-hand side and replaces it with a derivation involving double-negation elimination on ¬¬B. By repeating this procedure, we can always end up with proofs involving double-negation elimination only on double negated atomic propositions. This plays an essential role in Prawitz’s [10] normalization of classical proofs.

3 The Domain Structure 3.1 The Infinitely Nested Boolean Structure In the remainder of this paper, we shall consider the denotational semantics of the three calculi, λK, LK2, and NK2, presented above. The question is: what sort of structure can the three deductive systems be thought to represent? The most important feature of our semantics is the structure of the domains common to all the semantics. It is called the infinitely nested Boolean structure. In this structure, each type domain is divided into infinitely many ranks (≥ 0). For 0 1 2 any type A, DA ⊂ DA ⊂ DA ⊂ ..., where the superscripts indicate ranks, and the whole domain n n n n n for type A, DA = ⋃ DA. The domain DA of type A, rank n, has operators −A, ⊓A, and ⊔A, constituting a Boolean algebra. We need this complex structure because when the 0 of M¬¬A is in the original domain of type ¬¬A, D¬¬A, the denotation of (↓M¬¬A)A cannot be 0 in the original domain of type A, DA, as even a simple cardinality consideration may reveal; so 1 1 it must be expanded into DA. But then the added members of DA must land on an expansion 1 2 0 1 2 of DA, DA, etc. Furthermore, since DA→B must also be expanded into DA→B, DA→B, etc., for the same reason, how those added members of type A and type A → B ought to interact with

6 Classical Type Theory Akiba one another must be dealt with carefully. The key results are summarized in Subsubsection 3.1.3. More specifically, we define the type domains and their structures for our semantics by mathematical induction on the complexity of types. n n−1 In what follows, any object a properly in DA, i.e., object a such that a ∈ DA but a ∉ DA , n n ≤n is indicated as aA. Any object that is in DA but may not be properly so is indicated as aA . This is not essential, but for the sake of simplicity we take absurdity type – to be the sole base (or atomic) type of our model. We also take the function type A → B to be the type of total or partial (not just total) functions from the objects of type A to the objects of type B. For the semantics of λK, this inclusion of partial functions is actually not necessary, but for the semantics of LK2 and NK2, it is necessary. In addition to their different uses in the formal (object) languages, ‘–’ and ‘→’ will also be used in the metalanguage describing the semantics.

3.1.1 Base ˆ The sole base type: –.

0 0 0 ˆ D– = {T–, F–}.

0 0 0 0 0 0 0 0 0 0 0 0 0 ˆ For any p– and q–, (−–p–)–, (p– ⊓– q–)–, and (p– ⊔– q–)– are defined simply as the ordinary negation, conjunction, and disjunction:

0 0 0 0 0 0 0 0 0 0 p– (−–p–)– ⊓– T– F– ⊔– T– F– 0 0 0 0 0 0 0 0 T– F– T– T– F– T– T– T– 0 0 0 0 0 0 0 0 F– T– F– F– F– F– T– F–

1 0 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 ˆ D– has 16 members: T–, F–, (−–T–)–, (−–F–)–, (T– ⊓– F–)–, (T– ⊔– F–)–, etc., 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 1 1 1 0 1 0 1 1 where (−–(−–T–)–)– = T–, (T– ⊓– T–)– = T–, ((−–T–)– ⊓– (−–F–)–)– = (−–(T– ⊔– F–)–)–, 1 1 1 0 0 etc.; that is, −–, ⊓–, and ⊔– are Boolean operators connecting T– and F–.

2 1 2 2 2 ˆ D–, analogously, consists of the members of D– plus Boolean operators −–, ⊓–, and ⊔–, connecting those members.

m m−1 m m m 1 ˆ D– , generally, consists of the members of D– plus Boolean operators −– , ⊓– , and ⊔– , connecting those members.

m ˆ D– = ⋃ D– . m

3.1.2 Induction Step

m m m m m m Now that we have defined −– , ⊓– , and ⊔– , we proceed to define −A , ⊓A , and ⊔A for any type m m m A. We start with −¬–, ⊓¬–, and ⊔¬– (recall ¬– = – → –). These are defined as follows, where the term ‘undefined’ is abbreviated as U.

1 m m m Strictly speaking, −– belongs to type ¬– (= – → –) and ⊓– and ⊔– belong to type – → ¬– (= – → (– → –)), m m m so they should be denoted as −¬–, ⊓–→¬–, and ⊔–→¬–, respectively. But we simplify the notation. A similar simplification will be employed throughout this paper.

7 Classical Type Theory Akiba

ˆ n ≤m ≤m ≤m If n ≤ m, then for any x– , y– , y1– , and y2– , xn ÐÐÐÐÐÐ→ (−my≤m)m ⇔ xn ÐÐ→ y≤m – m ≤m m – – – – ≤m – (−¬–f¬– )¬– f¬– xn ÐÐÐÐÐÐ→ U ⇔ xn ÐÐ→ U – m ≤m m – ≤m (−¬–f¬– )¬– f¬– n ≤m m ≤m m n ≤m n ≤m x– ÐÐÐÐÐÐÐÐÐÐ→ (y1– ⊓– y2– )– ⇔ x– ÐÐÐ→ y1– and x– ÐÐÐ→ y2– ( ≤m⊓m ≤m)m ≤m ≤m f1¬– ¬–f2¬– ¬– f1¬– f2¬– n n n x– ÐÐÐÐÐÐÐÐÐÐ→ U ⇔ x– ÐÐÐ→ U or x– ÐÐÐ→ U ( ≤m⊓m ≤m)m ≤m ≤m f1¬– ¬–f2¬– ¬– f1¬– f2¬– n ≤m m ≤m m n ≤m n ≤m x– ÐÐÐÐÐÐÐÐÐÐ→ (y1– ⊔– y2– )– ⇔ x– ÐÐÐ→ y1– and x– ÐÐÐ→ y2– ( ≤m⊔m ≤m)m ≤m ≤m f1¬– ¬–f2¬– ¬– f1¬– f2¬– n ≤m n ≤m n x– ÐÐÐÐÐÐÐÐÐÐ→ y1– ⇐ x– ÐÐÐ→ y1– and x– ÐÐÐ→ U ( ≤m⊔m ≤m)m ≤m ≤m f1¬– ¬–f2¬– ¬– f1¬– f2¬– n ≤m n n ≤m x– ÐÐÐÐÐÐÐÐÐÐ→ y2– ⇐ x– ÐÐÐ→ U and x– ÐÐÐ→ y2– ( ≤m⊔m ≤m)m ≤m ≤m f1¬– ¬–f2¬– ¬– f1¬– f2¬– n n n x– ÐÐÐÐÐÐÐÐÐÐ→ U ⇔ x– ÐÐÐ→ U and x– ÐÐÐ→ U ( ≤m⊔m ≤m)m ≤m ≤m f1¬– ¬–f2¬– ¬– f1¬– f2¬–

ˆ m m ≤m m ≤m m ≤m m ≤m m If m < n, then for any g¬–, including (−¬–f¬– )¬–, (f1¬– ⊓¬– f2¬– )¬–, and (f1¬– ⊔¬– ≤m m f2¬– )¬–, (−nx≤n)n ÐÐ→ (−ny≤n)n ⇔ xn ÐÐ→ yn – – – m – – – – m – g¬– g¬– (−nx≤n)n ÐÐ→ U ⇔ x≤n ÐÐ→ U – – – m – m g¬– g¬– (x ≤n⊓nx ≤n)n ÐÐ→ (y ≤n⊓ny ≤n)n ⇔ x ≤n ÐÐ→ y ≤n and x ≤n ÐÐ→ y ≤n 1– – 2– – m 1– – 2– – 1– m 1– 2– m 2– g¬– g¬– g¬– (x ≤n⊓nx ≤n)n ÐÐ→ U ⇔ x ≤n ÐÐ→ U or x ≤n ÐÐ→ U 1– – 2– – m 1– m 2– m g¬– g¬– g¬– (x ≤n⊔nx ≤n)n ÐÐ→ (y ≤n⊔ny ≤n)n ⇔ x ≤n ÐÐ→ y ≤n and x ≤n ÐÐ→ y ≤n 1– – 2– – m 1– – 2– – 1– m 1– 2– m 2– g¬– g¬– g¬– (x ≤n⊔nx ≤n)n ÐÐ→ y ≤n ⇐ x ≤n ÐÐ→ y ≤n and x ≤n ÐÐ→ U 1– – 2– – m 1– 1– m 1– 2– m g¬– g¬– g¬– (x ≤n⊔nx ≤n)n ÐÐ→ y ≤n ⇐ x ≤n ÐÐ→ U and x ≤n ÐÐ→ y ≤n 1– – 2– – m 2– 1– m 2– m 2– g¬– g¬– g¬– (x ≤n⊔nx ≤n)n ÐÐ→ U ⇔ x ≤n ÐÐ→ U and x ≤n ÐÐ→ U 1– – 2– – m 1– m 2– m g¬– g¬– g¬–

m m m m m m Now that −¬–, ⊓¬–, and ⊔¬– have been defined, we now define −A→B, ⊓A→B, and ⊔A→B for any m m m m m m type A → B, assuming that −A , ⊓A , ⊔A , −B , ⊓B , and ⊔B have been defined. ˆ n ≤m ≤m ≤m If n ≤ m, then for any xA, yB , y1B , and y2B ,

n m ≤m m n ≤m xA ÐÐÐÐÐÐÐÐÐÐ→ (−B yB )B ⇔ xA ÐÐÐ→ yB (−m ≤m )m f m A→B fA→B A→B A→B n n xA ÐÐÐÐÐÐÐÐÐÐ→ U ⇔ xA ÐÐÐ→ U (−m ≤m )m ≤m A→B fA→B A→B fA→B n ≤m m ≤m m n ≤m n ≤m xA ÐÐÐÐÐÐÐÐÐÐÐÐÐÐ→ (y1B ⊓B y2B )B ⇔ xA ÐÐÐÐ→ y1B and xA ÐÐÐÐ→ y2B ( ≤m ⊓m ≤m )m ≤m ≤m f1A→B A→B f2A→B A→B f1A→B f2A→B n n n xA ÐÐÐÐÐÐÐÐÐÐÐÐÐÐ→ U ⇔ xA ÐÐÐÐ→ U or xA ÐÐÐÐ→ U ( ≤m ⊓m ≤m )m ≤m ≤m f1A→B A→B f2A→B A→B f1A→B f2A→B n ≤m m ≤m m n ≤m n ≤m xA ÐÐÐÐÐÐÐÐÐÐÐÐÐÐ→ (y1B ⊔B y2B )B ⇔ xA ÐÐÐÐ→ y1B and xA ÐÐÐÐ→ y2B ( ≤m ⊔m ≤m )m ≤m ≤m f1A→B A→B f2A→B A→B f1A→B f2A→B n ≤m n ≤m n xA ÐÐÐÐÐÐÐÐÐÐÐÐÐÐ→ y1B ⇐ xA ÐÐÐÐ→ y1B and xA ÐÐÐÐ→ U ( ≤m ⊔m ≤m )m ≤m ≤m f1A→B A→B f2A→B A→B f1A→B f2A→B n ≤m n n ≤m xA ÐÐÐÐÐÐÐÐÐÐÐÐÐÐ→ y2B ⇐ xA ÐÐÐÐ→ U and xA ÐÐÐÐ→ y2B ( ≤m ⊔m ≤m )m ≤m ≤m f1A→B A→B f2A→B A→B f1A→B f2A→B n n n xA ÐÐÐÐÐÐÐÐÐÐÐÐÐÐ→ U ⇔ xA ÐÐÐÐ→ U and xA ÐÐÐÐ→ U ( ≤m ⊔m ≤m )m ≤m ≤m f1A→B A→B f2A→B A→B f1A→B f2A→B

8 Classical Type Theory Akiba

ˆ m m ≤m m ≤m m ≤m m If m < n, then for any gA→B, including (−A→BfA→B)A→B, (f1A→B ⊓A→B f2A→B)A→B, and ≤m m ≤m m (f1A→B ⊔A→B f2A→B)A→B,

(−n x≤n)n ÐÐÐ→ (−n y≤n)n ⇔ x≤n ÐÐÐ→ y≤n A A A m B B B A m B gA→B gA→B (−n x≤n)n ÐÐÐ→ U ⇔ x≤n ÐÐÐ→ U A A A m A m gA→B gA→B (x ≤n⊓n x ≤n)n ÐÐÐ→ (y ≤n⊓n y ≤n)n ⇔ x ≤n ÐÐÐ→ y ≤n and x ≤n ÐÐÐ→ y ≤n 1A A 2A A m 1B B 2B B 1A m 1B 2A m 2B gA→B gA→B gA→B (x ≤n⊓n x ≤n)n ÐÐÐ→ U ⇔ x ≤n ÐÐÐ→ U or x ≤n ÐÐÐ→ U 1A A 2A A m 1A m 2A m gA→B gA→B gA→B (x ≤n⊔n x ≤n)n ÐÐÐ→ (y ≤n⊔n y ≤n)n ⇔ x ≤n ÐÐÐ→ y ≤n and x ≤n ÐÐÐ→ y ≤n 1A A 2A A m 1B B 2B B 1A m 1B 2A m 2B gA→B gA→B gA→B (x ≤n⊔n x ≤n)n ÐÐÐ→ y ≤n ⇐ x ≤n ÐÐÐ→ y ≤n and x ≤n ÐÐÐ→ U 1A A 2A A m 1B 1A m 1B 2A m gA→B gA→B gA→B (x ≤n⊔n x ≤n)n ÐÐÐ→ y ≤n ⇐ x ≤n ÐÐÐ→ U and x ≤n ÐÐÐ→ y ≤n 1A A 2A A m 2B 1A m 2A m 2B gA→B gA→B gA→B (x ≤n⊔n x ≤n)n ÐÐÐ→ U ⇔ x ≤n ÐÐÐ→ U and x ≤n ÐÐÐ→ U 1A A 2A A m 1A m 2A m gA→B gA→B gA→B

m m m Since all function types of form A → B are built up from types A and B, −A , ⊓A , and ⊔A have now been defined for any type A.

3.1.3 Summary As a consequence of the above, so long as all the relevant functions are total, the following equations hold. (As is usually the case in the literature, the ‘f(x)’ is simplified as ‘fx’ throughout this paper, omitting the parentheses.)

ˆ If n ≤ m, then for any h, k ≤ m,

m h m n m m h n max(h,n) m ((−A→BfA→B)A→BxA)B = (−B (fA→BxA)B )B h m k m n m h n max(h,n) m m n max(k,n) m ((f1A→B ⊓A→B f2A→B)A→BxA)B = ((f1A→BxA)B ⊓B (f2A→BxA)B )B h m k m n m h n max(h,n) m k n max(k,n) m ((f1A→B ⊔A→B f2A→B)A→BxA)B = ((f1A→BxA)B ⊔B (f2A→BxA)B )B

ˆ If m < n, then for any h, k ≤ n,

m n h n n n m h max(m,h) n (gA→B(−AxA)A)B = (−B(gA→BxA)B )B m h n k n n m h max(m,h) n m k max(m,k) n (gA→B(x1A ⊓A x2A)A)B = ((gA→Bx1A)B ⊓B (gA→Bx2A)B )B m h n k n n m h max(m,h) n m k max(m,k) n (gA→B(x1A ⊔A x2A)A)B = ((gA→Bx1A)B ⊔B (gA→Bx2A)B )B

m Put simply, when function fA→B involving the main operator of rank m is applied to object n xA involving the main operator of rank n, then (so long as the result is defined) the former distributes over the latter if m is larger than or equal to n; the latter distributes over the former if n is larger than m. In fact, we can treat ‘undefined’ U as if it were a special value (not the absence of one) and declare that the above equations hold universally (so, e.g., one side is U iff the other side is U, etc.), instead of making disclaimers about undefined cases. That’s in fact the convention we adopt in what follows, often omitting disclaimers.

9 Classical Type Theory Akiba

3.2 and Examples 3.2.1 Theorems

n 1. The total functions in each DA form a Boolean algebra. Proof Routine. ◻ Definition 1. For any type A and rank n,

n ≤n n n ≤n n n n ≤n n n ≤n n n TA =df (pA ⊔A (−ApA )A)A and FA =df (pA ⊓A (−ApA )A)A.

m n m n max(m,n) Theorem 2. For any fA→B and xA, assuming that (fA→BxA)B is defined, 1. If n ≤ m,

m n m m m m m n m m m m (fA→BxA)B = TB ⇔ fA→B = TA→B and (fA→BxA)B = FB ⇔ fA→B = FA→B.

2. If m < n,

m n n n n n m n n n n n (fA→BxA)B = TB ⇔ xA = TA and (fA→BxA)B = FB ⇔ xA = FA.

Proof From the results of Subsection 3.1.3 and Definition 1. ◻

3.2.2 Examples To give the reader a better sense of how the operators distribute depending on their ranks, we here present a few examples. Example 1.

n n−1 n n n n n n 1. (a) ((−A→BfA→B)A→B(x1A ⊓A x2A)A)B n n−1 n n n n n n = (−B(fA→B(x1A ⊓A x2A)A)B)B n n−1 n n n n−1 n n n n = (−B((fA→Bx1A)B ⊓B (fA→Bx2A)B)B)B. n n−1 n n n+1 n n+1 n+1 (b) ((−A→BfA→B)A→B(x1A ⊓A x2A)A )B n n−1 n n n n+1 n n−1 n n n n+1 = ((−A→BfA→B)A→Bx1A)B ⊓B ((−A→BfA→B)A→Bx2A)B)B n n−1 n n n n+1 n n−1 n n n n+1 = ((−B(fA→Bx1A)B)B ⊓B (−B(fA→Bx2A)B)B)B .

0 1 0 1 1 0 1 1 0 2 0 2 2 2. (a) ([(fA→¬B ⊓A→¬B gA→¬B)A→¬B(−AaA)A]¬B [xB ⊔B yB]B)– 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 2 1 0 0 0 0 0 1 = ([(−–((fA→¬BaA)¬BxB)–)–⊓–(−–((gA→¬BaA)¬BxB)–)–]– ⊔– [(−–((fA→¬BaA)¬ByB)–)– 1 1 0 0 0 0 0 1 1 2 ⊓– (−–((gA→¬BaA)¬ByB)–)–]–)–. 0 1 0 1 1 0 1 0 2 0 2 2 2 (b) ([f¬B ⊓¬B g¬B]¬B [(−A→BaA→B)A→B(xA ⊔A yA)A]B)– 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 2 1 0 0 0 0 0 1 = ([(−–(f¬B(aA→BxA)B)–)–⊓–(−–(g¬B(aA→BxA)B)–)–]– ⊔– [(−–(f¬B(aA→ByA)B)–)– 1 1 0 0 0 0 0 1 1 2 ⊓– (−–(g¬B(aA→ByA)B)–)–]–)–. 0 2 0 1 1 0 1 0 2 0 2 2 2 (c) ([f¬B ⊓¬B g¬B]¬B [(−A→BaA→B)A→B(xA ⊔A yA)A]B)– 1 0 0 0 0 0 1 2 1 0 0 0 0 0 1 2 2 1 0 0 0 0 0 1 = ([(−–(f¬B(aA→BxA)B)–)–⊔–(−–(f¬B(aA→ByA)B)–)–]– ⊓– [(−–(g¬B(aA→BxA)B)–)– 2 1 0 0 0 0 0 1 2 2 ⊔– (−–(g¬B(aA→ByA)B)–)–]–)–. n n n n+1 n+1 n+1 3. (a) ((−A→BfA→B)A→BFA )B = FB . n n n n n n n n n n (b) ((−A→BfA→B)A→BFA)B = ((−B(fA→BFA)B)B.

10 Classical Type Theory Akiba

n n n n n n 4. (a) (FA→B(−AxA)A)B = FB. n n+1 n n+1 n+1 n+1 n n n n+1 n+1 n n+1 (b) (FA→B(−A xA)A )B = (−B (FA→BxA)B)B = (−B FB)B . In 2, the main structures are indicated as [⋅]. It is a good specific example which illustrates the general features of conversions between objects in the domain. Any form of objects can ultimately be turned into objects in ‘normal form’, i.e., objects of rank 0 applied to one another constituting ‘atoms’, connected by the operators, −, ⊓, and ⊔. The structure of the original objects is retained in the structure of the atoms. The overall structures of the resulting objects, however, is determined not by the structures of the original objects but purely by the ranks of the operators. Specifically, higher-ranks always dominate and distribute, determining the n n n n n n n n n overall structures. (Note, however, that in cases like ((fA→B ⊓A→B gA→B)A→B(xA ⊔A yA)A)B, where the ranks are tied at n, the left-hand (functor) side always prevails and distributes over n n n n n n n n n n n n n n the right-hand (argument) side, i.e., = ((fA→B(xA ⊔A yA)A)B ⊓B (gA→B(xA ⊔A yA)A)B)B.) Consequently, as in 3 and 4 above as well as Theorem 2, Ts and Fs prevail only when they are at the highest rank. This will later prove to be a very important feature.

3.3 Type Reduction Again, we need the infinitely nested Boolean structure as the domain structure because double- negation elimination, a move from ¬¬A to A, is tantamount to type reduction from the propo- n sitions (or formulas)-as-types point of view. This move is interpreted as a move from D¬¬A for n+1 some n to DA , i.e., a move from type ¬¬A, rank n, to type A, rank n + 1. 0 0 0 1 0 Let’s consider between DA, D¬A, D¬¬A, and DA for any type A. Any function f¬A 0 0 0 0 0 will project some members of DA, say xAs, into T–, and some other members, say yAs, into F–, 0 while the values of yet some other members, say zAs, may be undefined. That is, 0 0 xA Ð→ T– 0 0 yA Ð→ F– z0 Ð→ U A 0 f¬A where U, recall, is short for ‘undefined’. Then define:

0 ≤1 1 0 1 1 1 1 0 1 1 1 {f¬A}A =df (()AxA)A ⊓A ()A(−AyA)A)A)A. 0 0 ′ 0 0 Similarly, any function F¬¬A will project some members of D¬A, say f¬As, into T–, and some ′ 0 0 ′ 0 other members, say g¬As, into F–, while the values of yet some other members, say h¬As, may be undefined. That is, ′ 0 0 f¬A Ð→ T– ′ 0 0 g¬A Ð→ F– h′ 0 Ð→ U ¬A 0 F¬¬A Then define: 0 ≤1 1 1 ′ 0 ≤1 1 1 {F¬¬A}A =df ()A(−A{g¬A}A )A)A. 0 0 0 0 Example 2. Suppose, for the sake of simplicity, that DA has only four members, aA, bA, cA, 0 0 0 0 0 and dA. Suppose F¬¬A projects all and only the following three functions, g1¬A, g2¬A, and g3¬A, 0 into F–: 0 0 0 0 0 aA, bA Ð→ T– Nothing Ð→ T– Nothing Ð→ T– 0 0 0 0 0 0 0 0 cA, dA Ð→ F– aA, bA Ð→ F– bA Ð→ F– Nothing Ð→ U c0 , d0 Ð→ U a0 , c0 , d0 Ð→ U 0 A A 0 A A A 0 g1¬A g2¬A g3¬A

11 Classical Type Theory Akiba

Then 0 ≤1 {F¬¬A}A = −(a ⊓ b ⊓ −c ⊓ −d) ⊓ −(−a ⊓ −b) ⊓ −(−b) 0 1 where ⋅A and ⋅A are omitted from the letters and the operators, respectively, for the sake of clarity. Recall that the operators involved are Boolean. Thus, for instance, the second conjunct 1 0 above is equivalent to (a ⊔ b)A, and the third conjunct is equivalent to bA. 0 Definition 2. The type reduction function for type ¬¬A at rank 0, R↓¬¬A→A, is defined as

0 0 ≤1 F¬¬A ÐÐÐÐÐ→ {F¬¬A}A ↓0 R ¬¬A→A

0 for any F¬¬A. Note that, unlike in most other cases, the superscript to the reduction function R ↓ does not indicate the function’s own rank; instead it indicates the rank of the reductee, i.e., the object that is the origin of the reduction. 0 n It is obvious, furthermore, that R ↓¬¬A→A can easily be expanded into R ↓¬¬A→A for any n n n n−1 and generalized into R↓¬¬A→A because both D¬¬A and DA are just Boolean expansions of D¬¬A n−1 and DA , respectively. Thus, we can obtain the general type reduction function R ↓¬¬A→A. Type reduction may also be called type-lowering (as in linguistics).

Theorem 3. 1. R↓¬¬A→A is an isomorphism.

n n 2. (Type Reduction) For any functions F¬¬A and f¬A,

n n n n n n ≤n+1 ≤n+1 n+1 (F¬¬Af¬A)– = F– ⇔ (f¬A{F¬¬A}A )– = F– .

3. For any A and n, n ≤n+1 ≤n+1 {F¬¬A}A = FA . 0 0 1 n n Proof 1. Routine. R↓¬¬A→A is an isomorphism from D¬¬A to DA, so is R↓¬¬A→A from D¬¬A n+1 n n to DA for any n > 0. 2. From 1. 3. Routine. Both sides can be T– , F– , or undefined. ◻ The picture that emerges from all these is this:

⋮ 0 D¬5A ⊇ ⋯ ⊃ D¬5A ⋮ 0 ⇓ R↓ D¬4A ⊂ ⋯ ⊆ D¬4A 1 0 D¬3A ⊇ ⋯ ⊃ D¬3A ⊃ D¬3A ⇓ R↓ 0 1 ⇓ R↓ ⇓ R↓ D¬¬A ⊂ D¬¬A ⊂ ⋯ ⊆ D¬¬A 2 1 0 D¬A ⊇ ⋯ ⊃ D¬A ⊃ D¬A ⊃ D¬A ⇓ R↓ ⇓ R↓ 0 1 2 DA ⊂ DA ⊂ DA ⊂ ⋯ ⊆ DA Fig. 1: Infinitely nested Boolean structure and type reduction

Here ‘¬3’ means ‘¬¬¬’, etc. The type and rank of each R↓ are omitted but should be obvious. Since each R is one-to-one, its converse function exists. Also, the compound functions along the lines of ⇓ above will prove to be useful.

Definition 3. For any type A, any m and n,

n n+m n+1 n 1. R↓¬2mA→A=df R↓¬¬A→A ○⋯ ○ R↓¬2(m−1)A→¬2(m−2)A ○R↓¬2mA→¬2(m−1)A.

12 Classical Type Theory Akiba

n n 2. R↑¬2mA→A is the converse function of R↓¬2mA→A. 0 1 0 0 For instance, as you can see in Fig. 1 above, R ↓¬4A→A= R ↓¬¬A→A ○R ↓¬4A→¬¬A and R ↑¬4A→A is its converse. R ↑ may be called a type-lifting function. The objects connected to an object by R↓ (and, thus, R↑ as well) may be called the object’s clones. The following will prove to be significant in the semantics of LK2 and NK2. 0 Lemma 1. Define f¬A thus: 0 Nothing Ð→ T– 0 0 eA Ð→ F– Everything else Ð→ U 0 f¬A

0 0 where eA is one particular object. Accordingly, f¬A is one particular (partial) function. Then 0 define F¬¬A thus: 0 Nothing Ð→ T– 0 0 f¬A Ð→ F– Everything else Ð→ U 0 F¬¬A 0 ≤1 0 Then {F¬¬A}A = eA. 0 ≤1 Proof From the definition of {F¬¬A}A . ◻ Theorem 4. In the above case,

0 0 0 0 F¬¬A = F¬¬A ⇔ eA = FA. Proof From Theorem 3.3 and Lemma 1. ◻ Again, this generalizes to rank n in a straightforward fashion.

4 Semantics of λK, LK2, and NK2

We are now in a position to consider the semantics of all the three calculi, λK, LK2, and NK2. In each case, we shall give interpretations to the terms, define the of semantic consequence ⊧, and then prove the ( and) completeness of the calculus with respect to the notion. Here the following comparison to the usual simple denotational semantics of classical propo- sitional logic should help understand the basic idea of our semantics. In the usual semantics of classical propositional logic, the key notion is truth: the deductive rules are all and only rules that are truth-preserving. We modify this idea in two ways. First, since we use the general Boolean and not the Boolean algebra involving only two values, we replace the notion of truth with that of non-falsity, i.e., any Boolean value except the bottom. Second, since we have a Boolean structure in each rank, values are relativized with ranks: non-falsity will be non-falsity at some rank n. With these two modifications in mind, we construct semantics along the lines of the usual semantics of classical propositional logic and show the completeness of the three calculi with respect them. In all the semantics, the difference of interpretations consists solely in the difference of valuations (or assignments), ρs, to the variables; everything else is fixed. (The semantics are similar to the usual semantics of classical propositional logic in this respect.) We give the same interpretation to the types involved in all the calculi.

13 Classical Type Theory Akiba

Definition 4. 1. For any atomic type X, [[X]]ρ = [[–]]ρ = absurdity type – (for any ρ).

2. [[A → B]]ρ = the type of total or partial functions from DA to DB (for any ρ).

4.1 Semantics of λK 4.1.1 Interpretation of λK [[⋅]] [[⋅]] The interpretation ρ[x↦d] is the same as the interpretation ρ except that object d is assigned to variable x.

Definition 5. 1. [[xA]]ρ = ρ(x) ∈ DA.

m n m n max(m,n) 2. If [[MA→B]]ρ = fA→B and [[NA]]ρ = eA, then [[(MA→BNA)B]]ρ = (fA→BeA)B .

[[( ) ]] = m n ( m n )max(m,n) = [[ ]] 3. λxAMB A→B ρ fA→B such that for any dA, fA→BdA MB ρ[x ↦dn ] . B A A

m m m m+1 4. If [[M¬¬A]]ρ = f¬¬A, then [[(↓¬¬A→A M¬¬A)A]]ρ = (R↓¬¬A→A f¬¬A)A .

m n Lemma 2. Suppose [[MA→B]]ρ = fA→B and [[NA]]ρ = eA. Then

1. If n ≤ m, m m [[(MA→BNA)B]]ρ = FB ⇔ [[MA→B]]ρ = FA→B.

2. If m < n, n n [[(MA→BNA)B]]ρ = FB ⇔ [[NA]]ρ = FA.

Proof From Theorem 2 and Definition 5.2. ◻

Theorem 5. 1. For any MA→B, NA, m, and n, for any ρ,

max(m,n) m n [[(MA→BNA)B]]ρ = FB ⇔ [[MA→B]]ρ = FA→B & n ≤ m OR [[NA]]ρ = FA & m < n.

2. For any xA,MB, and NA, for any ρ,

[[((λxAMB)A→BNA)B]]ρ = [[(M[xA ∶= NA])B]]ρ.

3. For any M¬¬A and n, for any ρ,

n n+1 [[M¬¬A]]ρ = F¬¬A ⇔ [[(↓M¬¬A)A]]ρ = FA .

4. For any M¬¬A and N¬A, for any ρ,

[[(N¬A(↓M¬¬A)A)–]]ρ = [[(M¬¬AN¬A)–]]ρ.

Proof 1. From Lemma 2. 2. From Definition 5.3. 3. From Theorem 3.3 and Definition 5.4. 4. From Theorem 3.2 and Definition 5.4. ◻

14 Classical Type Theory Akiba

4.1.2 Semantic Consequence in λK

Definition 6. For any set Γ of terms and any term NB,

m m n n Γ ⊧λK NB ⇔ ∀ρ(∀MA ∈ Γ.∃1m.[[MA]]ρ = fA ≠ FA ⇒ ∃1n.[[NB]]ρ = fB ≠ FB) where ‘∃1’ reads ’there exists exactly one’. Here the basic notion of semantic consequence is that of (necessary) non-falsity preservation: (necessarily) if all premises are non-false (including undefined), then the conclusion ought to be non-false, too. As a special case,

n n ⊧λK NB ⇔ ∀ρ.∃1n.[[NB]]ρ = fB ≠ FB.

4.1.3 Completeness of λK Theorem 5 shows that all the deduction rules of λK except (λI) are non-falsity preserving in both directions. λ-introduction (λI), or the so-called ‘(λ-)abstraction’, is exceptional because it contains a subproof. So we (only) need to show for the completeness of λK that (λI) is also non-falsity preserving in both directions in the relevant sense, i.e., that the subproof is non-falsity preserving iff the conclusion is necessarily non-false.

n Definition 7. Suppose [[MA]]ρ = eA. Then the rank of term MA in valuation ρ,

RK([[MA]]ρ) = n.

Definition 8. The top variable of term MA in valuation ρ, TV ([[MA]]ρ), is defined as follows.

1. TV ([[xA]]ρ) = xA.

m n 2. Suppose [[MA→B]]ρ = fA→B and [[NA]]ρ = eA. Then

(a) If n ≤ m, TV ([[(MA→BNA)B]]ρ) = TV ([[MA→B]]ρ).

(b) If m < n, TV ([[(MA→BNA)B]]ρ) = TV ([[NA]]ρ).

3. (a) If TV ([[MB]]ρ) ≠ xA,TV ([[(λxAMB)A→B]]ρ) = TV ([[MB]]ρ).

(b) If TV ([[MB]]ρ) = xA,TV ([[(λxAMB)A→B]]ρ) = SV ([[MB]]ρ), where the second-to-the-top variable, SV , is defined in an analogous, obvious manner. (Here the idea is to exclude bound variables from rank comparisons.)

(c) If all variables in MB are bound by λ, then TV ([[MB]]ρ) = undefined.

4. TV ([[(↓M¬¬A)A]]ρ) = TV ([[M¬¬A]]ρ).

The rank of TV ([[MA]]ρ)~SV ([[MA]]ρ) is called the top/second(-to-the-top) rank.

Lemma 3. For any term MA and valuation ρ,

RK([[MA]]ρ) = RK(TV ([[MA]]ρ)).

Proof Routine. ◻

Theorem 6. For any set Γ of terms, variable xA, and term MB,

Γ, xA ⊧λK MB ⇔ Γ ⊧λK (λxAMB)A→B.

15 Classical Type Theory Akiba

Proof In this proof we often omit subscripts if they are obvious or irrelevant. (⇒) Suppose Γ ⊭λK (λxAMB)A→B. Then there is a valuation ρ such that for every m m n N ∈ Γ, [[N]]ρ = f ≠ F for some m, but [[(λxAMB)A→B]]ρ = F for some n. So either (1) n n TV ([[MB]]ρ) ≠ xA and [[MB]]ρ = F ; or (2) TV ([[MB]]ρ) = xA and SV ([[MB]]ρ) = F . But ′ in case (1), there is a variant of ρ, say ρ , which is the same as ρ except that it assigns to xA n n n n a rank n object ≠ F . So [[xA]]ρ′ = f ≠ F and [[MB]]ρ′ = F . In case (2), there is a variant m of ρ, say ρ∗, which is the same as ρ except that it assigns to xA a rank m object ≠ F , where m m m is a rank lower than the rank of the second-to-the-top variable. So [[xA]]ρ∗ = f ≠ F and m [[MB]]ρ∗ = F . Therefore, either way, Γ, xA ⊭λK MB. (⇐) Suppose Γ, xA ⊭λK MB. Then there is a valuation ρ such that for every N ∈ Γ, [[N]]ρ = k k m m n f ≠ F for some k and [[xA]]ρ = f ≠ F for some m but [[MB]]ρ = F for some n. In this n n n case, TV ([[MB]]ρ) = F ≠ xA. So TV ([[(λxAMB)A→B]]ρ) = F . Thus, [[(λxAMB)A→B]]ρ = F . Therefore, Γ ⊭λK (λxAMB)A→B. ◻

In contrast, (λI) is obviously not truth-preserving; for instance, while xA ⊢λK xA is truth- preserving, (λxA.xA)A→A is not necessarily true.

Theorem 7. (Completeness of λK) For any set Γ of terms and any term NB,

Γ ⊢λK NB ⇔ Γ ⊧λK NB.

Proof Theorem 5.1–4 and Theorem 6 show, respectively, that (Ap), (λE), (↓I), (↓E), and (λI) are non-falsity preserving in the sense of Definition 6 not only from the top to the bottom but in both directions. ◻

4.2 Semantics of LK2 4.2.1 Interpretation of LK2

Definition 9. 1. [[xA]]ρ = ρ(x) ∈ DA.

n 2. [[––]]ρ = F– for some n.

n m 3. Suppose [[MA]]ρ = dA and [[NB]]ρ = eB . Then

m (a) If n ≤ m, [[(MA → NB)A→B]]ρ = fA→B such that m n m m (fA→BdA)B = eB . m m (b) If m < n, [[(MA → NB)A→B]]ρ = f¬2(n−m)A→B ○ R↑A→¬2(n−m)A such that m m n m m ((f¬2(n−m)A→B ○ R↑A→¬2(n−m)A)dA)B = eB . (c) In both (a) and (b), the relevant function is otherwise undefined unless its values are determined as a consequence of the above definitions. (As an example of a value determined as a consequence of the above definitions, consider if n ≤ m < k and k k n k m k k k m n m k k m k xA = (−AdA)A; then (fA→BxA)B = (−B(fA→BdA)B )B = (−BeB )B.)

Item 3, especially (b), may call for an explanation. Here the basic idea is that [[(MA → NB)A→B]]ρ is a (very) partial function that gives the value [[NB]]ρ for the argument [[MA]]ρ (i.e., [[(MA → NB)A→B]]ρ[[MA]]ρ = [[NB]]ρ) as it does in (a), but this idea does not work n straightforwardly if m < n. In that case, however, we can type-lift [[MA]]ρ = dA to its clone at

16 Classical Type Theory Akiba type ¬2(n − m)A, rank m, and apply the same idea.

0 m D¬2(n−m)A ⋯ D¬2(n−m)A Ò ⇑ Ò ⇑ R↑ Ò ⇑ 0 n DA ⋯ DA

Thus, still [[(MA → NB)A→B]]ρ[[MA]]ρ = [[NB]]ρ. (a) could be subsumed under the same pattern if the function were considered an (extreme or vacuous form of) type-lifting function R↑ and everything were a clone of itself, although we won’t do so here. n Recall (¬MA)¬A = (MA → ––)¬A and [[––]]ρ = F– for some n. n m Lemma 4. Suppose [[MA]]ρ = dA and [[(¬MA)¬A]]ρ = f¬A. Then

max(m,n) [[(¬MA)¬A]]ρ[[MA]]ρ = F– . Proof From Theorem 3.3 and Definition 9. ◻

Theorem 8. 1. For any MA, m, and n, for any ρ,

m n [[(¬MA)¬A]]ρ = F¬A & n ≤ m OR [[MA]]ρ = FA & m < n.

2. For any MA and n, for any ρ,

n n [[(¬(¬MA)¬A)¬¬A]]ρ = F¬¬A ⇔ [[MA]]ρ = FA. Proof 1. From Theorem 5.1 and Lemma 4. 2. From Theorem 4 and Definition 9.3. ◻ Needless to say, F is not a partial but a total function.

4.2.2 Semantic Consequence in LK2

Definition 10. For any set S of sequences and any sequence ∆, m n S ⊧LK2 ∆ ⇔ ∀ρ.∀Γ ∈ S.∃MA ∈ Γ.∃1m.[[MA]]ρ = FA ⇒ ∀σ.∃NB ∈ ∆.∃1n.[[NB]]σ = FB. As a special case, n ⊧LK2 ∆ ⇔ ∀σ.∃NB ∈ ∆.∃1n.[[NB]]σ = FB. Here the basic notion of semantic consequence is that of inconsistency preservation: if all premise sets are inconsistent, then the conclusion set ought to be inconsistent, too, where a set is inconsistent iff at least one of its members must be false.

4.2.3 Completeness of LK2

Theorem 9. (Completeness of LK2) For any set S of sequences and any sequence ∆,

S ⊢LK2 ∆ ⇔ S ⊧LK2 ∆. Proof Consider the four rules of LK2. The (–) and (¬) rules obviously pose no problem. We only need to consider the (→) and (¬→) rules and show the equivalence between the premise(s) and the conclusion of each rule. In what follows, if ‘n <’ appears more than once in one proof, they denote the same m such that n < m.

17 Classical Type Theory Akiba

ˆ k m Show ∀ρ(∃k.[[(¬MA)¬A]]ρ = FA & ∃m.[[NB]]ρ = FB ) ⇒ ∀σ.∃n.[[(MA → NB)A→B]]σ = n FA→B. n n n< Suppose for some σ, [[(MA → NB)A→B]]σ = fA→B ≠ FA→B. Then either [[MA]]σ = FA or m n k [[NB]]σ ≠ FB for any m. Then, for some ρ such that [[––]]ρ = F– , [[(¬MA)¬A]]ρ = g¬A ≠ n m F¬A for any k or [[NB]]ρ ≠ FB for any m. Hence the target proposition by contraposition. ˆ n k Show ∀σ.∃n.[[(MA → NB)A→B]]σ = FA→B ⇒ ∀ρ(∃k.[[(¬MA)¬A]]ρ = FA & ∃m.[[NB]]ρ = m FB ). k k m m Suppose for some ρ, (1) [[(¬MA)¬A]]ρ = f¬A ≠ F¬A or (2) [[NB]]ρ = gB ≠ FB . (1) Then k< k< k [[MA]]ρ = FA . So, for some σ such that [[MA]]σ = FA and [[NB]]σ = hB, [[(MA → k k m NB)A→B]]σ = iA→B ≠ FA→B. (2) Trivially, for some σ such that [[MA]]σ = jA , [[(MA → m NB)A→B]]σ ≠ FA→B. Hence, either way, the target proposition by contraposition. ˆ k m Show ∀ρ(∃k.[[MA]]ρ = FA or ∃m.[[(¬NB)¬B]]ρ = FB ) ⇒ ∀σ.∃n.[[(¬(MA → NB)A→B)¬(A→B)]]σ = n F¬(A→B). n n Suppose for some σ, [[(¬(MA → NB)A→B)¬(A→B)]]σ = f¬(A→B) ≠ F¬(A→B). Then [[(MA → n< n< n NB)A→B]]σ = FA→B. Then, for some ρ such that [[NB]]ρ = FB and [[––]]ρ = F– , [[MA]]ρ = n n n n fA ≠ FA and [[(¬NB)¬B]]ρ = g¬B ≠ F¬B. Hence the target proposition by contraposition. ˆ n k Show ∀σ.∃n.[[(¬(MA → NB)A→B)¬(A→B)]]σ = F¬(A→B) ⇒ ∀ρ(∃k.[[MA]]ρ = FA or ∃m.[[(¬NB)¬B]]ρ = m FB ). k k m m Suppose for some ρ, [[MA]]ρ = fA ≠ FA and [[(¬NB)¬B]]ρ = g¬B ≠ F¬B. Then [[NB]]ρ = m< m< m FB . Thus, for some σ, [[(MA → NB)A→B]]σ = FA→B and [[––]] = F– , where k ≤ m. m Therefore, [[(¬(MA → NB)A→B)¬(A→B)]]σ ≠ F¬(A→B). Hence the target proposition by contraposition. ◻

4.3 Semantics of NK2 4.3.1 Interpretation of NK2 The interpretation of the terms of NK2 is the same as that of the terms of LK2.

4.3.2 Semantic Consequence in NK2 The notion of semantic consequence in NK2 is basically the same as that in λK, i.e., that of non-falsity preservation (even though, of course, the interpretations involved are different).

Definition 11. For any set Γ of terms and any term NB,

m m n n Γ ⊧NK2 NB ⇔ ∀ρ(∀MA ∈ Γ.∃1m.[[MA]]ρ = fA ≠ FA ⇒ ∃1n.[[NB]]ρ = fB ≠ FB).

As a special case, n n ⊧NK2 NB ⇔ ∀ρ.∃1n.[[NB]]ρ = fB ≠ FB.

4.3.3 Completeness of NK2 NK2 is obviously deductively equivalent to LK2; thus, given the completeness of LK2, proving the completeness of NK2 is routine.

18 Classical Type Theory Akiba

Theorem 10. (Equivalence between LK2 and NK2) For any set Γ of terms and any term NB,

⊢LK2 ∆ ⇔ ∆ ⊢NK2 ––.

Proof From the equivalence between Gentzen’s original LK and NK. ◻

Theorem 11. (Completeness of NK2) For any set Γ of terms and any term NB,

Γ ⊢NK2 NB ⇔ Γ ⊧NK2 NB.

Proof From Theorem 9 and Theorem 10,

⊧LK2 ∆ ⇔ ⊢LK2 ∆ ⇔ ∆ ⊢NK2 ––.

But from Definition 6 and Definition 11 it is routine to show

∆ ⊧NK2 –– ⇔ ⊧LK2 ∆.

Further generalization is routine. ◻

5 Conclusion and Future Work

We have shown that the three deductive systems of classical type theory, λK, LK2, and NK2, are (sound and) complete with respect to the semantics with the common domain structure, the infinitely nested Boolean structure. Absurdity type – is identified with the type of truth values, and, generally, the notion of truth values, truth and, in particular, falsity, has turned out to play a crucial role in classical type theory. We now have a better understanding of the Curry-Howard correspondence for classical propositional logic: Classical propositional logic Classically-typed deductive systems λK, LK2 &NK2 Propositions Types Proofs Terms Implication → (in propositions) Function types Absurdity – (in propositions) Type of truth values (infinitely Boolean-expanded) Double-negation elimination Type reduction R↓ [[(MA → NB)A→B]]ρ Partial function from [[MA]]ρ to [[NB]]ρ For the normalization of classical proofs, recall Subsection 2.4. One of the most interesting things about the Curry-Howard correspondence for classical logic is that it is not simply an extension of the correspondence for intuitionistic logic. In the latter, absurdity type – is the empty (or uninhabited) type, type with no members, whereas in the former, it is the type of truth values, and it plays a crucial, anchoring role in the infinitely nested Boolean structure. In our model, we assumed for the sake of convenience that the only base type is absurdity type –. It should be obvious, however, that the model can be expanded in a straightforward fashion to include other base types. In such models, rank 0 of those types contains the usual members of the types, but the Boolean structure starts at rank 1; all the non-zero ranks are tied to the ranks of type –. So type – is indispensable. Obvious questions to answer in the immediate future are: What is the plausible untyped deductive system of classical type theory? and What is the structure like the system is complete with? Can the untyped version of λK be the system we are looking for? And what is the

19 Classical Type Theory Akiba appropriate semantics for it? There are impressive correspondences between the semantics we have offered and Scott’s [12] D∞ model of the untyped λ-calculus. Where Scott uses complete partial orders, we use Boolean structures. Can his idea for D∞ models be transferred to the semantics of the untyped version of classical type theory? We are inclined to think so and hope to show it in a near future. Note also that the untyped versions of LK2 and NK2 are simply the usual sequent calculus and natural deduction for classical propositional logic, Gentzen’s original LK and NK. So we should be able to give (perhaps unnecessarily complicated but interesting) denotational semantics of classical propositional logic, too.

Another obvious question to answer is about the relation between our semantics and syn- tactic or procedural (especially, passing style) treatments of classical type theory such as [5]. Also, what is the relation between our calculi and other well-known classical calculi − ∼ such as Parigot’s [9] λµ-calculus and Curien and Herbelin’s [4] λµµ-calculus? How can they be understood from our semantic viewpoint?

Another obvious project is an expansion of classical type theory dealing with universal and existential quantification, i.e., where the type inferences are those of logic. Here, just like in the minimal/intuitionistic cases, predication should be considered type construction and universal quantification should be considered a creation of types, but since, unlike in the minimal/intuitionistic cases, the existential quantifier is definable with the universal quantifier, a simplification is possible.

A little longer-term project concerns the use of classical type theory in the semantics of . While classical type theory may remain as a mere curiosity in the study of programming languages, there is much hope that it can be used more widely in the semantics of natural languages. In the Montague [8]/generalized-quantifier [2] theory, quantifiers such as all Presidents and some Presidents, conjoinments such as Bush and Obama and Bush or Obama, and even proper names such as Bush and Obama are considered to denote objects of type (e → t) → t instead of e, where e is the type of individuals (ind) and t is the type of truth values (bool). [[Bush is a Republican]] = T not because [[is a Republican]][[Bush]] = T but [[Bush]][[is a Republican]] = T. This is an odd theory as far as proper names are concerned, but to make proper names type e, we need a reduction rule (e → t) → t ⊢ e. Our investigation into classical type theory began when we realized that this rule was just an instance of the double-negation elimination rule (A → –) → – ⊢ A if – is identified with t.

The current type theory for natural language is based on the Montague/generalized-quantifier theory, and as a result, type assignments become very complicated very easily. We are inclined to think that there may be a way to simplify the theory by using classical type theory with type reductions. Another, related, issue is about in natural language. Every man loves some woman or Adam and Bob love Carol or Diane can be understood in two ways, de- pending on whether the conjunction (or the universal quantifier) has scope over the disjunction (or the existential quantifier) or vice versa. However, the grammatical structure of the sentence seems only one way. How can we resolve this apparent conflict? Our suggested answer is by assigning different ranks to the operators involved. Generally, we can separate scope structures of natural language sentences from their grammatical structures by taking the former to be determined by ranks while the latter to be determined by types. As these examples should indicate, there seem to be a lot of things we can do in the semantics of natural language by using classical type theory.

20 Classical Type Theory Akiba

References

[1] F. Barbanera and S. Berardi. A symmetric for classical program extraction. and Computation 125 (1996): 103–117. [2] J. Barwise and R. Cooper. Generalized quantifiers and natural language. Linguistics and Philos- ophy 4 (1981), 159–219. [3] E. W. Beth. Semantic entailment and formal derivability. Mededelingen van de Koninklijke Ned- erlandse Akademie van Wetenschappen, Afdeling Letterkunde, new series 18 (1955): 309–42. [4] P.-L. Curien and H. Herbelin. The duality of computation. In ICFP ’00 Proceedings of the Fifth ACM SIGPLAN International Conference on , 233–243. ACM, 2000. [5] P. de Groote. A CPS-translation of the λµ-calculus. In S. Tison (ed.), Colloquium on Trees in Algebra and Programming (Lecture Notes in 787), 85–99. Springer, 1994. [6] G. Gentzen. Untersuchungen ¨uber das logische Schliessen. Mathematische Zeitschrift 39 (1935): 176–210, 405–431. [7] H. Herbelin. A λ-calculus structure isomorphic to Gentzen-style sequent calculus structure. In L. Pacholski and J. Tiuryn (eds.) Computer Science Logic. 8th Workshop, CSL’94 (Lecture Notes in Computer Science 933), 61–75. Springer, 1995. [8] R. Montague. The proper treatment of quantification in ordinary English. In J. Hintikka, J. Moravcsik, and P. Suppes (eds.), Approaches to Natural Language, 221–242. Reidel, 1973. [9] M. Parigot. λµ-calculus: an algorithmic interpretation of classical natural deduction. In A. Voronkov (ed.), Logic Programming and Automated Reasoning: International Conference, LPAR ’92 (Lecture Notes in Artificial Intelligence 624), 190–201. Springer, 1992. [10] D. Prawitz. Natural Deduction. Almqvist and Wiksell, 1965.

[11] N. J. Rehof and M. H. Sørensen. The λ∆-calculus. In M. Hagiya and J. C. Mitchell (eds.), The- oretical Aspects of Computer Software: International Symposium TACS ’94 (Lecture Notes in Computer Science 789), 516–542. Springer, 1994. [12] D. S. Scott. Continuous lattices. In F. W. Lawvere (ed.), , Algebraic and Logic (Lecture Notes in Mathematics 274), 97–136. Springer, 1972. [13] R. M. Smullyan. First-Order Logic. Dover, 1968. [14] M. H. Sørensen and P. Urzyczyn. Lectures on the Curry-Howard Isomorphism. Elsevier, 2006. [15] A. S. Troelstra and H. Schwichtenberg. Basic , 2nd edn. Cambridge University Press, 1996.

21