Monday, 24 November 2014

Discussing 'Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem'


Author: N. G. de Bruijn (Eindhoven University of Technology)

Reference: Indagationes Mathematicae Vol. 75(5), pp 381-392 (1972).

Why this paper? Cited by 4 (of a possible 29) of the papers in my Google Scholar Updates recommendations.

Comments: As the papers I discuss for this blog are those most cited in my Google Scholar 'Updates' recommendations, it is not surprising that the 'classic papers' I've looked at so far have been very closely related to my research interests. This week's paper is slightly further away, but is a classic indeed, notable enough to have a pretty good Wikipedia article about it (Wikipedia's 'nominal techniques' article is, by comparison, a neglected stub).

De Bruijn indices are one solution to the problems of names and binding which we've discussed on this blog before. They work by eradicating names altogether. This is an apparently brutal but very well-motivated idea, because the choice of names, for example of variables in a computer program, is formally arbitrary. So why have them?

There are two main answers to this rhetorical question. The first is that names allow the 'internal book-keeping' needed to keep track of what is being referred to at various points inside a program. De Bruijn's contribution is to show that this style of book-keeping can be replaced by counting how many steps there are between the introduction of (what we'd usually consider) a name, and its use.

The second answer to my rhetorical question is that, as openly admitted by de Bruijn in the introduction, names seem essential for human-readable syntax. De Bruijn frames his alternative approach as a tool for automation, as well as programming, and indeed in these contexts his approach has flourished and remains important. But there is now much interest in formalising human proofs, and in interactive theorem proving in which human and computer work together towards a proof, and so combining human-readability with full formality is an important goal. This is the niche in which nominal techniques (and some approaches as well) have become prominent. In fact even de Bruijn's contribution can be seen in this light, as there does exist another, much older, nameless approach based on so-called 'combinators'; de Bruijn's approach sits much closer to human practice.

Monday, 17 November 2014

Discussing 'Nominal logic, a first order theory of names and binding'


Author: Andrew M. Pitts (University of Cambridge)

Reference: Information and Computation vol. 186(2), pp. 165–193 (2003).

Why this paper? Cited by 5 (of a possible 29) of the papers in my Google Scholar Updates recommendations.

Comments: Two weeks ago I discussed "A New Approach...", the paper that introduced nominal techniques. In that discussion I specifically mentioned (the conference version of) this week's paper as the one that introduced nominal as the term of the art for these techniques. So this is very much a sequel paper, and as such this is very much a sequel discussion - please do read my earlier discussion before this one.

As I discussed, the innovation of "A New Approach" was the mathematical shift to a non-standard set theory. Such a move is beautiful and clever, but does run the risk of being profoundly alienating to working computer scientists who simply want to solve problems involving names and binding! This paper, without abandoning the central insights gleaned from the Fraenkel-Mostowski setting, shows how much can be accomplished without straying beyond first-order logic, a completely standard logical setting that no one could object to. Along with this, Pitts makes a notion called nominal sets the semantical heart of his developments. Nominal sets appear in "A New Approach" as a preliminary construction on the road to the set-theoretic semantics, but they are far simpler than the full non-standard set theory. Although they are less expressive, this paper makes the case that they are expressive enough for most applications, a view which has been vindicated by the hundreds of papers that have since used the nominal sets framework.

While both logic and semantics have proved very useful, there is an acknowledged mismatch in this paper between them, via an incompleteness result - first-order logic is not really powerful enough to fully describe the properties of nominal sets, even 'cut down' as they are from the full set theory. For the notion of the 'set of free names' of a term (in nominal sets jargon, the support of an element) to be specified we would need the more powerful second-order logic. However the assertion that a name is not in the set of free names of (in the jargon, is fresh for) a term can be expressed in first-order logic, and turns out to be all that is needed for most applications. James Cheney resolved this mismatch in a 2006 paper, which provided a semantics that was complete for this paper's nominal logic, although I'm not aware of any applications of this very interesting theoretical work. After all incompleteness is often unavoidable, so is not necessarily a barrier to getting some work done!

Monday, 10 November 2014

Discussing 'Display Logic'


Author: Nuel D. Belnap, Jr. (University of Pittsburgh)

Reference: Journal of Philosophical Logic vol. 11(4), pp. 375-417 (1982).

Why this paper? Cited by 7 (of a possible 29) of the papers in my Google Scholar Updates recommendations.

Comments: This week's paper is perhaps best understood as standing at the crossroads of two of the biggest features of modern logic (by which I mean, roughly, logic since Gödel blew everything up).

The first is that modern logicians are interested in structured proofs. Rather than attempting to proceed from axioms to conclusion in an undirected way, it can be useful to lock ourselves in to a system which tightly constrains what steps we may make within our proof, and hence prevents us from getting lost. Such structure can in particular guide automated proof search, i.e. the question of how one writes computer programs to do proofs automatically. This is vital for proving properties of, for example, massive software, where the sheer scale would defeat any human effort even if each individual step is quite simple-minded. The godfather of this field of structural proof theory is Gerhard Gentzen, who in the mid 30s invented not one but two of the most important proof systems we work with to this day: natural deduction, which is supposed to formally capture the way humans reason, and his sequent calculus, which is particularly useful for proving certain properties of logics such as their consistency, and provides the basis for some automated provers.

Gentzen was only interested in two sorts of logic - classical and intuitionistic. Modern logicians do not have it so easy, as the second feature I want to highlight is the dizzying and constantly increasing variety of different logics out there, sporting all sorts of different notions of truth, inference, meaning, and so forth. Many logics are created to meet some specific application; computer science leads the pack here, but philosophers are also prolific inventors of new logics, and other areas like linguistics, mathematics, and physics chip in too. Still other logics are invented for entirely 'pure' reasons, with logicians twiddling with the settings of existing logics to see what pops out (and this style of logic research has seen the invention of logics that later found important concrete applications).

There is a tension between these desires for structure and novelty - the more controlled the proof system, the less likely it is that your wacky new logic can be fitted to it. This has led to a variety of extensions of Gentzen's ideas to make them flexible enough to fit a wider variety of logics, and Belnap's display calculus, introduced in this 1982 paper, is the most flexible I know of. This made it the perfect basis for the paper I wrote last year with some co-authors at Australian National University, where we used display calculus to give a structured proof system for a logic called 'Full Intuitionistic Linear Logic' whose proof theory had previously been a rather awkward business (hence, of course, the occurrences of this citation in my Google Scholar Updates recommendations).

Display calculus is an extension of Gentzen's sequent calculus. A sequent is a set of assumptions and conclusions, possibly with some structure imposed on them such as an ordering. Display calculus uses more richly structured sequents which sport the display property, a technical property which allows any assumption or conclusion you have in your current sequent to be 'displayed' so that it becomes the ongoing focus of your calculations, with all other parts of your sequent set to one side. The cool things about this setup are first, that an enormous variety of logics can be given display calculi (though by no means all; Belnap himself mentions quantum logic as something which he couldn't fit into his structure). Second, any calculus with the display property is guaranteed to have a certain property called cut-elimination which is extremely useful for proving all sorts of things about your logic, but which can often be extremely tricky to prove from scratch. So using display calculus can save a lot of work! Of course, nothing comes for free, and display calculi do have limitations, such as not being much use as a basis for automation. But they are still a useful tool to know about for the logician hoping to tame the jungle of logics that are out there.

Monday, 3 November 2014

Discussing 'A New Approach to Abstract Syntax with Variable Binding'


Authors: Murdoch J. Gabbay and Andrew M. Pitts (University of Cambridge)

Reference: Formal Aspects of Computing Vol. 13(3-5), pp 341-363 (2002).

Why this paper? Cited by 9 (of a possible 29) of the papers in my Google Scholar Updates recommendations (where multiple citations from different papers by the same author(s) in my recommendations are disregarded).

Comments: My PhD and some of my subsequent research was built around something called nominal techniques; this is the journal version of the conference paper that introduced them (in fact the second author, Andrew Pitts, was my PhD supervisor). Already some clarification is necessary: computer science has for some reason developed an unusual publication culture in which peer-reviewed conferences, rather than journals, take center stage. But conference publication often imposes tight space limits on papers, which can force authors to tighten their prose, which I find no bad discpline, but more regrettably can mean some details or examples are omitted. Hence new research is often published twice, with a more detailed 'journal version' following the conference version, often years later because of the slowness of the journal review process (which itself is probably contributed to by so much work having to be reviewed twice!). Another clarification to my first sentence is that the word 'nominal', which has become the brand name under which all developments of this work by Gabbay and Pitts are grouped, does not appear in this paper. I believe it was introduced by Pitts in his 'Nominal logic' paper, which was published before this paper but written after it, thanks again to the vagaries of academic publication.

The problem this paper addresses is that of reasoning formally in the presence of names and binding, ubiquitous features of computer science applications and other formal settings like mathematics. Of course names are everywhere - think of variable names in programs, or the identifiers like x and y we use when we do maths. The precise names we use is at some level arbitrary; while we're doing our mathematical manipulations we better keep track of our xs and ys, but 'from the outside' it obviously wouldn't have mattered if we'd called our variables foo and bar instead. Binding (sometimes, scope) is simply the point where this 'outside' versus 'inside' distinction is made: some operations have the property that the choices of names inside the operation's domain are irrelevant to anything outside that operation's domain. Such structure is vital in software engineering applications where people worry about encapsulation, but is in fact virtually unavoidable in any sufficiently interesting formal setting.

Anyone with a passing interest in computing, or even logic or mathematics, would nod along to most of the previous paragraph, but perhaps would not become greatly interested. Names and binding are basic machinery, and there is no reason to spend time thinking about them, as opposed to getting on with using them! The twist comes when one tries to reason fully formally, for example to convince a computer that a certain program has a certain desirable property. This sort of reasoning, if successful, can yield guarantees about software far more robust than mere testing, but it is not easy, and names and binding structure turns out to be be one of the (many) barriers to doing this successfully. In particular, proofs involving structural induction, which are vital to programming languages applications in particular, do not play well with bound names. So there is a problem to be solved.

The solution proposed by Gabbay and Pitts (I should note that other candidate solutions exist, but I will not discuss them here) is to change the set theoretic foundations on which we build our mathematics, from the standard one to an alternative framework developed by Fraenkel and Mostowski in the 1930s for reasons completely unrelated to computer science. In this framework certain elements called atoms claim a privileged place, giving mathematics in this universe a slightly different flavour. This paper adapts this work in (to me) wildly surprising fashion to show that if we view these atoms as our names then we have just the right 'universe' in which to model, and reason in a reasonably intuitive way about, binding, up to and including the structural induction I mentioned earlier.

It should be acknowledged, of course, that doing mathematics in a 'different universe' sounds like an cumbersome (and possibly eccentric!) move. For this stuff to actually be used, the esoteric set theory needs to be at least partially hidden, and subsequent work, most notably the 'nominal logic' paper I mentioned above, has helped to do this. Still, all of the many subsequent applications of Gabbay and Pitts's work can be seen to rest on some of the most abstruse mathematics you can imagine, a story that must gladden the heart of any working theoretician!