Linear Logic for Constructive Mathematics
Posted by Mike Shulman
Intuitionistic logic, i.e. logic without the principle of excluded middle (), is important for many reasons. One is that it arises naturally as the internal logic of toposes and more general categories. Another is that it is the logic traditionally used by constructive mathematicians — mathematicians following Brouwer, Heyting, and Bishop, who want all proofs to have “computational” or “algorithmic” content. Brouwer observed that excluded middle is the primary origin of nonconstructive proofs; thus using intuitionistic logic yields a mathematics in which all proofs are constructive.
However, there are other logics that constructivists might have chosen for this purpose instead of intuitionistic logic. In particular, Girard’s (classical) linear logic was explicitly introduced as a “constructive” logic that nevertheless retains a form of the law of excluded middle. But so far, essentially no constructive mathematicians have seriously considered replacing intuitionistic logic with any such alternative. I will refrain from speculating on why not. Instead, in a paper appearing on the arXiv today:
- Linear logic for constructive mathematics, arxiv:1805.07518
I argue that in fact, constructive mathematicians (going all the way back to Brouwer) have already been using linear logic without realizing it!
Let me explain what I mean by this and how it comes about — starting with an explanation, for a category theorist, of what linear logic is in the first place.
When we first learn about logic, we often learn various tautologies such as de Morgan’s laws and the law of excluded middle . (As usual, denotes “and”, while denotes “or”.) The field of algebraic semantics of logic starts with the observation that these same laws can be regarded as axioms on a poset, with denoting the binary meet (greatest lower bound) and the join (least upper bound). The laws of classical logic correspond to requiring such a poset to be a Boolean algebra. Thus, a proof in propositional logic actually shows an equation that must hold in all Boolean algebras.
This suggests there should be other “logics” corresponding to other ordered/algebraic structures. For instance, a Heyting algebra is a lattice that, considered as a thin category, is cartesian closed. That is, in addition to the meet and join , it has an “implication” satisfying . Any Boolean algebra is a Heyting algebra (with ), but not conversely. For instance, the open-set lattice of a topological space is a Heyting algebra, but not generally a Boolean one. The logic corresponding to Heyting algebras is usually called intuitionistic logic, and as noted above it is also the traditional logic of constructive mathematics.
(Note: calling this “intuitionistic logic” is unfaithful to Brouwer’s original meaning of “intuitionism”, but unfortunately there seems to be no better name for it.)
Now we can further weaken the notion of Heyting algebra by asking for a closed symmetric monoidal lattice instead of a cartesian closed one. The corresponding logic is called intuitionistic linear logic: in addition to the meet and join , it has a tensor product with internal-hom satisfying an adjunction . Logically, both and are versions of “and”; we call the “additive conjunction” and the “multiplicative conjunction”.
Note that to get from closed symmetric monoidal lattices to Boolean algebras by way of Heyting algebras, we first make the monoidal structure cartesian and then impose self-duality. (A Boolean algebra is precisely a Heyting algebra such that , where is the bottom element and is the intuitionistic “not ”.) But we can also impose self-duality first and then make the monoidal structure cartesian, obtaining an intermediate structure called a star-autonomous lattice: a closed symmetric monoidal lattice equipped with an object (not necessarily the bottom element) such that . Such a lattice has a contravariant involution defined by and a “cotensor product” , and its internal-hom is definable in terms of these: . Its logic is called (classical) linear logic: in addition to the two conjunctions and , it has two disjunctions and , again called “additive” and “multiplicative”.
Star-autonomous lattices are not quite as easy to come by as Heyting algebras, but one general way to produce them is the Chu construction. (I blogged about this last year from a rather different perspective; in this post we’re restricting it to the case of posets.) Suppose is a closed symmetric monoidal lattice, and is any element of at all. Then there is a star-autonomous lattice whose objects are pairs such that , and whose order is defined by In other words, is a full sub-poset of . Its lattice operations are pointwise: while the tensor product is more interesting: The self-duality is from which we can deduce the definitions of and :
Where do closed symmetric monoidal lattices come from? Well, they include all Heyting algebras! So if we have any Heyting algebra, all we need to do to get a star-autonomous lattice from the Chu construction is to pick an object . One natural choice is the bottom element , since that would be the self-dualizing object if our Heyting algebra were a Boolean algebra. The resulting monoidal structure on is actually semicartesian: the monoidal unit coincides with the top element .
The point, now, is to look at this Chu construction from the logical perspective, where elements of are regarded as propositions in intuitionistic logic. The elements of are pairs such that , i.e. pairs of mutually incompatible propositions. We think of such a pair as a proposition together with information about what it means to affirm or prove it and also information about what it means to refute or disprove it. The condition means that cannot be both proven and refuted; but we might still have propositions such as which can be neither proven nor refuted.
The above definitions of the operations in a Chu construction similarly translate into “explanations” of the additive connectives and the multiplicative connectives in terms of affirmations and refutations:
- A proof of is a proof of together with a proof of . A refutation of is either a refutation of or a refutation of .
- A proof of is either a proof of or a proof of . A refutation of is a refutation of together with a refutation of .
- A proof of is a refutation of . A refutation of is a proof of .
- A proof of is, like for , a proof of together with a proof of . But a refutation of consists of both (1) a construction of a refutation of from any proof of , and (2) a construction of a refutation of from any proof of .
- A proof of consists of both (1) a construction of a proof of from any refutation of , and (2) a construction of a proof of from any refutation of . A refutation of is, like for , a refutation of together with a refutation of .
These explanations constitute a “meaning explanation” for classical linear logic, parallel to the Brouwer-Heyting-Kolmogorov interpretation of intuitionistic logic. In particular, they justify the characteristic features of linear logic. For instance, the “additive law of excluded middle” fails for the same reason that it fails under the BHK-interpretation: we cannot decide for an arbitrary whether to prove it or refute it. However, the “multiplicative law of excluded middle” is a tautology: if we can refute , then by definition we can prove , while if we can refute , then again by definition we can prove . In general, the multiplicative disjunction often carries the “constructive content” of what the classical mathematician means by “or”, whereas the additive one carries the constructive mathematician’s meaning. (Note also that the “proof” clauses of are essentially the disjunctive syllogism.)
I think this is already pretty neat. Linear logic, regarded as a logic, has always been rather mysterious to me, especially the multiplicative disjunction (and I know I’m not alone in that). But this construction explains both of them quite nicely.
However, there’s more. It’s not much good to have a logic if we can’t do mathematics with it, so let’s do some mathematics in linear logic, translate it into intuitionistic logic along this Chu construction, and see what we get. In this post I won’t be precise about the context in which this happens; the paper formalizes it more carefully as a “linear tripos”. Following the paper, I’ll call this the standard interpretation.
To start with, every set should have an equality relation. Thus, a set in linear logic (which I’ll call an “L-set”) will have a relation valued in linear propositions. Since each of these is an element of , it is a pair of mutually incompatible intuitionistic relations; we will call these and respectively.
Now we expect equality to be, among other things, a reflexive, symmetric, and transitive relation. Reflexivity means that , i.e. that is true (that is, is reflexive) and is false (that is, is irreflexive). Symmetry means that , i.e. that and : that is, and are both symmetric.
Of course, transitivity says that if and , then . But in linear logic we have two different “and”s; which do we mean here? Suppose first we use the additive conjunction , so that transitivity says (here is the logical equivalent of the inequality in our lattices). Using the definition of in , this says that (that is, is transitive) and (this is sometimes called comparison).
Put together, the assertions that is reflexive, symmetric, and transitive say that (1) is reflexive, symmetric, and transitive, and (2) is irreflexive, symmetric, and a comparison. Part (1) says essentially that an L-set has an underlying I-set, while (2) says that this I-set is equipped with an apartness relation.
Apartness relations are a well-known notion in constructive mathematics; if you’ve never encountered them before, here’s the idea. In classical mathematics, if we need to say that two things are “distinct” we just say that they are “not equal”. However, in intuitionistic logic, being “not equal” is not always a very useful thing. For instance, we cannot prove intuitionistically that if a real number is not equal to zero then it is invertible. However, we can prove that every real number that is apart from zero is invertible, where two real numbers are “apart” if there is a positive rational distance between them. This notion of “apart” is an irreflexive symmetric comparison which is stronger than “not equal”, and many other sets in intuitionistic mathematics are similarly equipped with such relations.
The point is that the standard interpretation automatically produces the notion of “apartness relation”, which constructive mathematicians using intuitionistic logic were led to from purely practical considerations. This same sort of thing happens over and over, and is what I mean by “constructive mathematicians have been using linear logic without realizing it”: they invented lots of concepts which are invisible to classical mathematics, and which may seem ad hoc at first, but actually arise automatically if we do mathematics “naturally” in linear logic and then pass across the standard interpretation.
To convince you that this happens all over the place, here are a bunch more examples.
If and are L-sets, then in the cartesian product L-set we have defined by . In the standard interpretation, this corresponds to the usual pairwise equality for ordered pairs and a disjunctive apartness: means . That is, two ordered pairs differ if they differ in one component.
If and are sets, the elements of the function L-set are I-functions that are strongly extensional: (this is called “strong” because the apartness may be stronger than “not equal”). This is a common condition on functions between sets with apartness relations.
Equality between functions is defined by . I didn’t talk about quantifiers above, but they act like infinitary versions of . Thus we get meaning , the usual pointwise equality of functions, and meaning : two functions differ if they differ on at least one input.
Because linear propositions are pairs of intuitionistic propositions, the elements of the L-powerset of an L-set are pairs of I-subsets of the underlying I-set of , which must additionally be strongly disjoint in that . Bishop and Bridges introduced such pairs in their book Constructive analysis under the name “complemented subset”. The substitution law translates to the requirement that be strongly extensional (also called “-open”): .
Equality between L-subsets means . In the standard interpretation, means as we would expect, while means . In particular, we have (where the empty L-subset is ) just when . So the obvious linear notion of “nonempty” translates to the intuitionistic notion of inhabited that constructive mathematicians have found to be much more useful than the intuitionistic “not empty”.
An L-group is an L-set with a multiplication , unit , and inversion satisfying the usual axioms. In the standard interpretation, this corresponds to an ordinary I-group equipped with an apartness such that multiplication and inversion are strongly extensional: and . Groups with apartness have been studied in intuitionistic algebra going back to Heyting, and similarly for other algebraic structures like rings and modules.
An L-subgroup of an L-group corresponds to a complemented subset as above such that is an ordinary I-subgroup and is an antisubgroup, meaning a set not containing , closed under inversion (), and satisfying . Antisubgroups have also been studied in constructive algebra; for instance, they enable us to define an apartness on the quotient by if .
An L-poset is an L-set with a relation that is reflexive, transitive () and antisymmetric (). Under the standard interpretation, this corresponds to two binary relations, which it is suggestive to write and : then is an ordinary I-partial-order, is a “bimodule” over it ( and dually) which is cotransitive () and “anti-antisymmetric” in the sense that . Such pairs of strict and non-strict relations are quite common in constructive mathematics, for instance on the real numbers.
In the paper there are even more examples of this sort of thing. However, even this is not all! So far, we haven’t made any use of the multiplicative connectives in linear logic. It turns out that often, replacing some or all of the additive connectives in a definition by multiplicative ones yields, under the standard interpretation, a different intuitionistic version of the same classical definition that is also useful.
Here are a few examples. Note that by semicartesianness (or “affineness” of our logic), we have and (in a general star-autonomous lattice, there may be no implication either way).
A “-field” is an L-ring such that . Under the standard interpretation, this corresponds to an I-ring (with apartness) such that , i.e. every element is either zero or invertible. The rational numbers are a field in this sense (sometimes called a geometric field or discrete field), but the real numbers are not. On the other hand, a “-field” is an L-ring such that . Under the standard interpretation, this corresponds to an I-ring (with apartness) such that and , i.e. every element apart from zero is invertible and every “strongly noninvertible” element is zero. The real numbers are a field in this weaker sense (if the apartness is tight, this is called a Heyting field).
In classical mathematics, means . Constructively, this is (again) true for integers and rationals but not the reals. However, it is true for the reals in linear logic that .
If in the definition of an L-set we weaken transitivity to , then in the standard interpretation the comparison condition disappears, so that need only be irreflexive and symmetric, i.e. an inequality relation. (To be precise, the comparison condition is actually replaced by the weaker statement that satisfies substitution with respect to .) This is useful because not every I-set has an apartness relation, but every I-set does have at least one inequality relation, namely “not equal” (the denial inequality). There are also other inequality relations that are not apartnesses. For instance, the inequality defined above on L-powersets is not an apartness but is still stronger than “not equal”, and in the paper there is an example of a very naturally-occurring normal L-subgroup of a very naturally occurring L-group for which the inequality on the quotient is not an apartness.
Again, there are more examples in the paper, including generalized metric spaces and topological/apartness spaces. (I should warn you that the terminology and notation in the paper is somewhat different; in this post I’ve been constrained in the math symbols available, and also omitted some adjectives for simplicity.)
What does this observation mean for constructive mathematics? Well, there are three levels at which it can be applied. Firstly, we can use it as a “machine” for producing constructive versions of classical definitions: write the classical definition in linear logic, making additive or multiplicative choices for the connectives, and then pass across the standard interpretation. The examples in the paper suggest that this is more “automatic” and less error-prone than the usual process of searching for constructive versions of classical notions.
Secondly, we can also use it as a machine for producing theorems about such constructive notions, by writing a proof in linear logic (perhaps by simply translating a classical proof — many classical proofs remain valid without significant changes) and translating across the standard interpretation. This can save effort and prevent mistakes (e.g. we don’t have to manually keep track of all the apartness relations, or worry about forgetting to prove that some function is strongly extensional).
Thirdly, if we start to do that a lot, we may notice that we might as well be doing constructive mathematics directly in linear logic. Linear logic has a “computational” interpretation just like intuitionistic logic does — its proofs satisfy “cut-elimination” and the “disjunction and existence properties” — so it should be just as good at ensuring that mathematics has computational content, with the benefit of not having to deal explicitly with apartness relations and so on. And the “meaning explanation” I described above, in terms of proofs and refutations, could theoretically have been given by Brouwer or Heyting instead of the now-standard BHK-interpretation. So one might argue that the prevalence of the latter is just a historical accident; maybe in the future a linear constructive mathematics will grow up alongside today’s “intuitionistic constructive mathematics”.
Re: Linear Logic for Constructive Mathematics
Hi Michael,
This is really neat! The way you derive apartness is really very slick, and is absolutely going to be how I explain it from now on.
Two remarks about this post:
About a decade ago, Kazushige Terui did quite a bit of work on set theories which used linear logic as their ambient logic – see his Light Affine Set Theory. The inspiration comes from the line of work on using linear logic to characterize complexity classes, and indeed Terui is able to prove that in LAST, a relation between A and B is functional if and only if there is a polynomial time algorithm sending A’s to B’s. (The thing I like about this set theory is that it’s a naive set theory, since the paradoxes of self-reference require contraction.)
Sociologically, I think this also why constructive logicians have been hesitant to embrace linear logic: they tend to think of it as a logic of feasible computation (as contrasted with intuitionistic logic being a logic of pure computability). So it is seen as something even more subtle in its distinctions than constructive mathematics. When I asked Paul Taylor, he told me:
However, there has been quite a bit of work on Chu-like constructions for giving realizability interpretations of classical logic – if you Google for “TT-closure” or “biorthogonality” or “J.L. Krivine”, you’ll find a lot of hits. For the audience here, I’d recommend Thomas Streicher’s Krivine’s Classical Realizability from a Categorical Perspective.
Perhaps there is some connection between the tripos-like notion in your paper and Streicher’s, but since I haven’t done more than skim your paper yet, I couldn’t say.