To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Spectrum Exchangeability, Sx, is an irrelevance principle of Pure Inductive Logic, and arguably the most natural (but not the only) extension of Atom Exchangeability to polyadic languages. It has been shown1 that all probability functions which satisfy Sx are comprised of a mixture of two essential types of probability functions; heterogeneous and homogeneous functions. We determine the theory of Spectrum Exchangeability, which for a fixed language L is the set of sentences of L which must be assigned probability 1 by every probability function satisfying Sx, by examining separately the theories of heterogeneity and homogeneity. We find that the theory of Sx is equal to the theory of finite structures, i.e., those sentences true in all finite structures for L, and it emerges that Sx is inconsistent with the principle of Super-Regularity (Universal Certainty). As a further consequence we are able to characterize those probability functions which satisfy Sx and the Finite Values Property.
In the ‘real world’ of logical and mathematical texts, definitions are indispensable. This is particularly the case when the amount of ‘knowledge’ begins to grow.
Therefore we aim at an extension of λC with definitions. In the present chapter we start with an overview of what definitions are and how they are used. Gradually, we shall transform the definitions to a more formal format, in order to be able to incorporate them in λC. The derivation system that we eventually obtain when extending λC with definitions, we call λD, to be described in Chapter 10. A simpler precursor shall be named λD0; see Chapter 9. In the following sections we describe and discuss the essential features of definitions, and how they can be formalised.
We first ask ourselves: what is the use of a definition? The main reason for introducing a definition is to denote and highlight a useful concept. Both logic and mathematics are based on certain notions, most of which are composed from other ones. It is very convenient to single out the noteworthy notions by giving them names.
We start with a number of examples of definitions as they occur in mathematics books.
Examples 8.1.1 (1) ‘A rectangle is a quadrilateral with four right angles.’ Here the notion that we want to single out is ‘a quadrilateral with four right angles’. We give it the name ‘rectangle’.
The traveling salesman problem is one of the most important problems in operationsresearch, especially when additional precedence constraints are considered. Here, weconsider the well-known variant where a linear order on k special vertices is giventhat has to be preserved in any feasible Hamiltonian cycle. This problem is called OrderedTSP and we consider it on input instances where the edge-cost function satisfies aβ-relaxedtriangle inequality, i.e., where the length of a direct edge cannotexceed the cost of any detour via a third vertex by more than a factor ofβ> 1. Wedesign two new polynomial-time approximation algorithms for this problem. The firstalgorithm essentially improves over the best previously known algorithm for almost allvalues of kand β<1.087889. The second algorithm gives a further improvement for2n ≥ 11k +7 and β< √34/3 , where n is the number of vertices in the graph.
In type theory, sets are not directly represented, although we have often treated sets as types (i.e. objects of type *) in the previous chapters. We wrote *s instead of * to underline this. However, types and sets have very different backgrounds. In Chapters 2 to 6, we introduced types as formal expressions, in order to eliminate undesired properties from the (‘free’) untyped lambda calculus. Sets, on the other hand, are mathematical constructs, meant to enable us to talk about collections of mathematical objects.
Until now, considering sets as types has worked out fine. But we may expect serious problems when it comes to subsets. The reason is that the Uniqueness of Types property (see e.g. Lemma 10.4.10) conflicts with the ‘natural’ view on subsets. For example, let S be a set and T a proper subset of S. Now let c be an element of S. In type theory this could be expressed as c: S. But what if we wish to express that c is also an element of the subset T? Then c: T doesn't work, because types S and T are different, hence Uniqueness of Types would be violated.
As another example, let P be a property of elements in S. Then one can form the set {x ∈ S | P x} of all elements of S satisfying P.
In the previous chapters we have become acquainted with the use of λD for doing mathematics, by selecting a few examples and investigating the issues that we came across.
Let's now make a fresh start by thoroughly exploring the most fundamental entities in mathematics: natural and integer numbers. This will not be easy, since in the process of development we have to pretend that we ‘know nothing’ about subjects we are so familiar with. As a consequence, we have to build up our knowledge from scratch, which may seem cumbersome, but it is also quite interesting, since we are obliged to scrutinise the foundations of mathematics.
In the present section, we start with the basis: natural numbers. Integers will be the main topic of following sections.
In Chapter 1 we saw how natural numbers, and operations on naturals such as addition and multiplication, can be coded in untyped lambda calculus, as so-called Church numerals (see Exercise 1.10). There also exist encodings of these notions in typed lambda calculi: in the chapter about λ2 we have discussed the so-called polymorphic Church numerals; see, for example, Section 3.8 and Exercise 3.13. (For Church numerals in λ→: see Section 2.14.)
Therefore, it would be a type-theoretically justified choice to introduce the natural numbers in this manner. This can be done by writing down the appropriate definitions, since λ2 is a subsystem of λD.
In Section 5.4, IV, we saw how implication can be coded in type theory (in particular, in λP). We recall: by coding the implication A ⇒ B as the function type A → B, we mimic the behaviour of ‘implication’, including its introduction and elimination rule, in type theory. So we also have minimal propositional logic in λC, since λP is part of λC.
In order to get more than minimal propositional logic, we have to be able to handle more connectives, such as negation (‘¬’), conjunction (‘∧’) and disjunction (‘∨’). This cannot be done in λP, but in λC there exist very elegant ways to code the respective notions, as we presently show.
We start with negation. It is natural to consider the negation ¬A as the implication A ⇒ ⊥, where ⊥ is the ‘absurdity’, also called contradiction. So we interpret ¬A as ‘A implies absurdity’. But for this we first need a coding of the absurdity itself. (In Exercises 3.5 and 6.1 (a) we already mentioned codings of ⊥ in λ2 and λC, which we shall justify below.)
I. Absurdity
A characteristic property of the proposition ‘absurdity’, or ⊥, is the following:
If ⊥ is true, then every proposition is true.
In natural deduction this property is known under the name ⊥-elimination.
We present a new model of a two-dimensional computing device called Sgraffitoautomaton. In general, the model is quite simple, which allows a clear designof computations. When restricted to one-dimensional inputs, that is, strings, theSgraffito automaton does not exceed the power of finite-state automata. On the other hand,for two-dimensional inputs, it yields a family of picture languages with good closureproperties that strictly includes the class REC of recognizable picture languages. Thedeterministic Sgraffito automata define a class of picture languages that includes theclass of deterministic recognizable picture languages DREC, the class of picture languagesthat are accepted by four-way alternating automata, those that are accepted bydeterministic one-marker automata, and the sudoku-deterministically recognizable picturelanguages, but the membership problem for the accepted languages is still decidable inpolynomial time. In addition, the deterministic Sgraffito automata accept some unarypicture languages that are outside of the class REC.
Logic, a fundamental part of many sciences, can be fruitfully expressed and used in an appropriate type-theory-with-definitions such as λD. We have demonstrated this extensively in Chapter 11. Our conclusion is that a flag-style approach, which is still fully formal, is very similar to the common informal style of deduction which is standard for reasoning in both logic and mathematics. The type theory λD can be fruitfully exploited for expressing the logical system of natural deduction in a feasible and practical manner.
In the present chapter, we turn to mathematics. The deductive framework of logic is essential for doing mathematics, since it embodies the principles of reasoning, but mathematics itself is much more than logic (or reasoning) alone.
In order to explore these matters, we start with some illustrative examples, showing the possibilities and the problems connected with doing mathematics in type theory. Our purpose is to investigate whether (or rather: to show how) λD ‘works’ in mathematical practice.
It will turn out that a formal translation of a mathematical text into the λD-format may demand more effort than expected. This is due, of course, to the very precise nature of the ‘formal language’ λD, requiring all aspects to be spelled out, sometimes even to an annoying degree of detail; although the flag style alleviates the burden to some extent.
The type theory λD provides a system in which mathematical definitions, statements and proofs can be completely spelled out in a very structured way that is still close to ordinary mathematical practice. This enables and facilitates the formalisation of mathematics and the checking of its correctness. Below, we summarise the main features of type theory, and in particular λD, as a system for formalising mathematics.
Formalisation of mathematics via type theory In λD-like type theory, a mathematical notion can be defined precisely in full detail and the definition can be reasoned with in a logically sound way. The type system enforces a very high level of precision, which gives additional insight into mathematical and logical constructs. Nevertheless, formalising mathematics in λD is still very close to what is standard in mathematics.
Checking of mathematics The high level of precision of type theory greatly improves the level of correctness of the formalised mathematics: incomplete proofs, or proofs using illegal logical steps, are not accepted and a definition has to be syntactically correct. The soundness of course still depends on the axioms that one has assumed: if the axioms do not correspond to what one wants to formalise, or if they are inconsistent, the derived results are still useless. This already applies to informal mathematics, so the formalisation in type theory is separate from the question of whether the axioms are sound.
In Section 8.7, we considered a well-known theorem from number theory, and we have given a mathematical proof of it in Section 8.8. We now revisit this theorem and its proof, which are reproduced below, and translate it into the formal λD-format.
A thorough inspection of what we need for the formalisation of the proof in its entirety will take up the space of a full chapter: the present one. It acts as a final exercise, showing several important aspects of λD.
In the process, we will encounter various questions and problems. We'll try to foresee some of these questions and solve them before we start the actual proof. Other problems we solve ‘on the fly’. On some occasions, we come across situations of missing foreknowledge that is either too laborious or too uninspiring to be dealt with in this book; in those cases we resort to only summarising what is lacking. Hence, we decide neither to fill every gap, nor to always supply the relevant details.
The mentioned theorem reads as follows:
'Theorem (“Bézout's Lemma”, restricted version)
Let m, n ∈ ℕ+ be coprime. Then ∃x,y∈ℤ(mx + ny = 1).’
Remark 15.1.1The lemma has been attributed to the French mathematician É. Bézout (1730–1783), although it already appeared in earlier work of others.
A Hamming compatible metric is an integer-valued metric on the words of a finite alphabetwhich agrees with the usual Hamming distance for words of equal length. We define a newHamming compatible metric and show this metric is minimal in the class of all“well-behaved” Hamming compatible metrics. This gives a negative answer to a questionstated by Echi in his paper [O. Echi, Appl. Math. Sci. (Ruse) 3(2009) 813–824.].