An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract...

51
An Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an infinitary calculus in a well-founded set theory. Created 2010/09/07 Last Change Date: 2013/01/03 17:12:44 Id: t041.doc,v 1.18 2013/01/03 17:12:44 rbj Exp http://www.rbjones.com/rbjpub/pp/doc/t041.pdf c Roger Bishop Jones; Licenced under Gnu LGPL

Transcript of An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract...

Page 1: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

An Illative Lambda-Calculus

Roger Bishop Jones

Abstract

This is an approach to illative lambda-calculi via construction of an infinitary calculus in awell-founded set theory.

Created 2010/09/07

Last Change Date: 2013/01/03 17:12:44

Id: t041.doc,v 1.18 2013/01/03 17:12:44 rbj Exp

http://www.rbjones.com/rbjpub/pp/doc/t041.pdf

c© Roger Bishop Jones; Licenced under Gnu LGPL

Page 2: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

Contents

1 Prelude 3

2 Introduction 32.1 Type Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.2 Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 The Infinitary Interpretation 63.1 Infinitary Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3.1.1 Recursion and Induction Principles and Rules . . . . . . . . . . . . . . . . . . . 83.1.2 More Closure Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.1.3 Finitary Constant Combinators . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.1.4 Infinitary Combinators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.2 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.2.1 The Combinators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.2.2 Direct Conversions for the Pure Combinators . . . . . . . . . . . . . . . . . . . 173.2.3 Extraction of Negative Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.2.4 Equality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.2.5 Illative Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.2.6 Closure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.2.7 The Semantic Functor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.2.8 Equivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.3 Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.3.1 Approach based on Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . 233.3.2 More closely following Barendregt . . . . . . . . . . . . . . . . . . . . . . . . . 263.3.3 Proof Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.3.4 Representation of Reductions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293.3.5 The Reduction Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

3.4 Coordinate Set Equivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313.4.1 Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313.4.2 Residuals and Node Formation . . . . . . . . . . . . . . . . . . . . . . . . . . . 313.4.3 Reductions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313.4.4 Combinatory Direct Reductions . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

4 Primitives of Illative Lambda Calculus 334.1 The Type of Lambda-Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.2 Judgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.3 Primitive Combinators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344.4 Application and Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5 Illative Lambda-Calculus 355.1 Primitive Equality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365.2 The System of Type Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

6 Postscript 36

A Theory Listings 37A.1 The Theory icomb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37A.2 The Theory ilamb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

Bibliography 49

2

Page 3: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

Index 50

1 Prelude

This document is one of a series in which I explore approaches to non-well-founded foundationsfor mathematics. The immediately preceding document in this series is [7] which considers an ideafor the construction of non-well-founded interpretations of set theory. It was my intention in thatdocument ultimately to apply the results in giving a semantics to an illative lambda-calculus. WhenI last considered resuming the work in [7] I concluded that it might be better to go directly to thedesired lambda-calculus omitting the non-well-founded set theory, by adapting the methods of thatpaper to a functional rather than a set theoretic ontology. This had not been possible in the firstplace, because I did not have clear enough idea of how it could be done. The methods I am employingare more easily understood in the first instance through set theory (at least, it was in that contextthat I came to them). With the benefit of having explored the techniques in the context of set theory,I now am able to see how they might be applied directly to a lambda-calculus, and in this documentI make the attempt.

Discussion of what might become of this document in the future may be found the postscript (Section6).

In this document, phrases in coloured text are hyperlinks, like on a web page, which will usually getyou to another part of this document (the blue parts, the contents list, page numbers in the Index)but sometimes take you (the red bits) somewhere altogether different (if you happen to be online),e.g.: the online copy of this document.

[8]

2 Introduction

The idea is to obtain an exotic model for illative lambda-calculi by methods analogous to thoseemployed for set theory in [7], and then to use that as a semantic foundation for the definition ofone or more finitary illative lambda-calculi with systems of type assignment.

The work is conducted by conservative extension in the context of a higher order set theory establishedaxiomatically in HOL, which I will refer to as HOL/GSU, or just GSU[4]. The end result is intendedto be a semantic embedding of an illative lambda-calculus into HOL/GSU. This end is to be realisedin stages as follows:

• Establish an infinitary illative combinatory logic.

– Define the infinitary syntax by transfinite recursion in GSU.

– Define the semantics, by determining a partial equivalence relation from a notion of re-ducibility over the syntax. This involves taking a least fixed point of a recursive definitionof the relation and proving a result analogous to the Church-Rosser theorem to establishcoherence and non-triviality of the results.

• Using this as a semantic domain, a new type is then introduced, which will be the domainover which the operations in the illative lambda-calculus will be defined. The theory is thendeveloped by defining further operations as necessary and proving results which establish therequired type assignment and inference rules for the embedded calculus.

3

Page 4: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

2.1 Type Assignments

The systems of type assignments I am interested in have the following features:

• A universal type.

• Dependent product and sum (function and pair) types.

• A heirarchy of ‘Universes’ (but since we have an absolute universe I will probably follow GSUin calling them galaxies), not all well-founded, each closed under dependent type constructions(this has the effect of power set and replacement).

• A well-founded part in which classical mathematics can be conducted in the normal way (i.e.getting the theories isomorphic to the standard classical versions), and which admits arbitrarilyrisky axiomatic extensions analogous to (possibly even identical to) large cardinal axioms (withno greater risk here than in ZFC). The well founded part is the union of iterated galaxyconstruction over the empty set.

The difficult question with such a shopping list, is whether it can be consistently fulfilled, and theprincipal purpose of this document is to explore an idea about how to construct an interpretationwhich might allow the equiconsistency of the systems considered here with ZFC (plus large cardinalswhere appropriate) to be established. Having said that, the procedure is semantics first, so I aim toconstruct the interpretation first, and then to derive logical systems of which it is an interpretation.This method guarantees that the resulting system is consistent relative to my set theory (which is‘A Higher Order Theory of Well-Founded Sets (with Urelements)’ (GSU), see [4]). 1

In the talk which follows about syntax and semantics there are two levels involved, that of theinfinitary calculus (which is the interpretation constructed in GSU) and that of the finitary calculuswhich will be based on it.

2.2 Consistency

A few more words about consistency may be in order.

The approach here is to ensure consistency in the desired logic by working from semantics to proofrules. The logic determined by proof rules is bound to be consistent because the proof rules areeither theorems proven about the chosen semantic domain or else derived rules implemented in ourmetalanguage for reasoning in the new language. This is a natural outcome of the method whichconsists in implementing the desired language using a ‘shallow embedding’ in a higher-order settheory.

Adoption of this method does not in itself solve the consistency problem, the problem appears in thenecessary semantic preliminaries for the embedding. To succeed it is necessary to understand howthe consistency problem appears and have some idea of how it can be resolved.

In this case, the consistency problem for an illative lambda-calculus is to be resolved by providinga syntactic model in an infinitary illative combinatory logic. The problem is then to obtain asatisfactory account of the infinitary combinatory system. Ideally the elements of the model wouldbe equivalence classes of terms under convertibility, but one of the primitive combinators is to be

1This is a modification of the pure set theory GS to admit urelements, which are irrelevant to the theory here,but may improve the smoothness of its integration into HOL. GS actually started with urlements, but then I removedthem, and now I have put them back in. They don’t make it significantly more complicated, at least not in the areasI have covered.

4

Page 5: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

read as that very equivalence relation and the effect is that the relation of convertability cannot be atotal relation over the combinators (this is how the consistency problem reappears). This effect arisesbecause the combinator must be defined by recursion, and the higher order equation of which a fixedpoint is obtained from the definition will not have a total fixed point (this is the manifestation of thevarious paradoxes such as Russell’s or more directly relevant here, Curry’s paradox). Consistency isobtained by accepting a partial fixed point, this is equivalent on the one hand to regarding the Russellset as a ”partial set”, of which some things (including itself) are neither members nor non-members,neither definitely in nor out. In the case of the Curry paradox, we find that implication does notalways have a truth value (it is total over the truth values, just not over lambda terms in general).So we have to find a way of working with a partial equivalence relation, which will be the primitiveillative combinator in terms of which all the others are defined.

In the context of a combinatory logic this can be realised by limiting the possible reductions ofequivalence terms, which is not a pure combinator. Such an equivalence will always reduce to‘T’ if its two arguments are convertible, but in the case that they are not, it may not always bereduced to ‘F’, in some cases it will not reduce. It therefore is not ‘on the nail’, it is in effect anapproximation to convertability. The key point in the semantics is therefore the definition of thisrelation of convertibility.

The definition of this is recursive and is not well-founded so the definition involves taking a fixedpoint of a monotone functor over partial relations which approximate to convertability. A totalequality combinator would reduce to T or F (suitably chose combinators) when applied to anytwo combinatory terms, according to whether the two terms are convertible. A partial equalitycombinator will not always reduce, there will be some pairs of terms for which one cannot have adefinite view as to their convertibility. One reason for this might be that if no reduction of theequation were possible then they would not be convertible, but once the reduction of the equationto F is added it then becomes possible to convert the two terms. Such a pair of terms could beconstructed corresponding to the liar paradox, and making the equality combinator partial protectsagainst the derivation of contradiction in that way, by allowing that the liar sentence be neither truenor false.

Allowing this equivalence to be partially defined, in particular taking it to be the least fixed point ofthe defining equations under an appropriate ordering, is what gets us out of the paradox and shouldyield a good semantics. This device is to be combined with steps intended to make this semanticsas rich as a strong first order set theory (one in which inaccessible cardinals can be proven to exist).Whether this will also support a system of type assignments along the lines desired remains to beseen, I have not articulated in this context my reasons for hoping that will be the case. The rationaleis more fully thought through for the analogous methods which I was previously applying to modelsof non-well-founded set theories, and for the preceeding work on ‘polysets’(see [6, 5, 10, 9, 3].

The equivalence relation is compounded from several components of which only one is ‘illative’and contentious (though the two combinators which handle infinitely many arguments may also bethought contentious!). There is a question how to organise these separate components and how muchto do prior to devising the functor of which the least fixed point gives the semantics of equivalence.

The proposed method, thus outlined, requires no further fundamental innovations to deliver a model,though there will be many opportunities to get details wrong. There is however, no guarantee thatthe resulting system will support the kind of type-assignment system which I have in mind, this ishighly speculative. The greatest difficulty is in the complexity of the formal derivations required,which may prove beyond me.

5

Page 6: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

3 The Infinitary Interpretation

I have had quite a few (lost count) iterations in my conception of the syntax of the infinitary systemwhich I use for the semantics of the target illative lambda-calculus.

My first attempt was an infinitary illative lambda calculus in which there was infinitary abstraction(abstraction over infinitely many variables at once) and application (application of an infinitaryabstraction to an infinite collection of arguments). There was something unsatisfactory about thisapproach (a muddle about the scope of the variables, which I used to tag the arguments in anapplication) and by the time I had sorted it out the infinitary abstraction had been dumped (infavour of infinitary function displays). Unfortunately the new version left me with five syntacticconstructors, and, because the (infinitary) abstract syntax is hand cranked, I have a strong incentiveto keep its complexity to an absolute minimum. So I decided to ditch abstraction, and with it,variables.

Several attempts on I now have an infinitary illative combinatory logic with just one syntacticconstructor.

I call this syntax infinitary because the syntax has large (inaccessible) cardinality. It isn’t actually adeductive system, but it is a language, for which we have syntax and semantics. We have a notion oftruth and can prove the truth of expressions of our infinitary language in the metalanguage (whichis HOL/GSU, a higher order set theory).

The semantic intent explains the infinitary nature of the system considered, this is so that we haveunderlying our ultimate language (which will be a finitary untyped illative lambda-calculus with asystem of type assignments) a basis for the development of exactly the same (“classical”) applicablemathematics as is more often considered in the context of ZFC or HOL. For this purpose there areintended to be, within the ontology, structures which mirror or mimic the hierarchy of well-foundedsets, and particularly, full function spaces over well founded subsets of the universe.

The idea is to define a kind of syntactic interpretation for the lambda-calculus and to give a semanticsto it. Lambda terms in the target language will denote equivalence classes of infinitary combinators inthe underlying language. The equivalence classes over the combinators are generated by the definingequations for the combinators except for the sole illative combinator, which will be equivalence (akaconvertibility). The tricky bit is to determine the semantics of this equivalence relation, since theformal definition follows the previous sentence in being recursive, and the recursion will probably notbe well-founded. This is done by treating it as a partial equivalence, giving the recursive definitionin the form of a functor over partial approximations to convertibility, and then taking the least fixedpoint of this functor, and praying that there will be enough in there.

An important departure from the method adopted for non-well-founded set theory in [7] is theacceptance that the domain of discourse will be full of junk (e.g. non-normalising terms), and thatthe application of a lambda-calculus based on this interpretation will depend on reasoning almostexlusively within the confines of well-behaved subdomains which are delimited by an appropriatesystem of type-assignment (even though the terms themselves will be un-typed). This is intended toyield something which will look a bit like a typed lambda-calculus with subtyping and a universaltype (plus some other exotic features to make it at least as strong as ZFC) but which differs fromit in a manner similar to the difference between the simply-typed lambda-calculus and a system oftype assignments to the pure lambda-calculus.

SML

open theory "misc3";

force new theory "icomb";

force new pc "1icomb";

6

Page 7: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

merge pcs r"1savedthm cs D proof "s "1icomb";

new parent "equiv";

set merge pcs r"misc31", "1icomb"s;

3.1 Infinitary Syntax

The syntax of an infinitary illative combinatory logic is to be encoded as sets in a higher order settheory.

Since I will probably have to prove something like the Church-Rosser theorem and the syntax can bemade very simple, this will be a bare bones treatment of the syntax, by contrast with my previoussimilar enterprise for non-well-founded set theory in [7].

There will be just one constructor, which is the ordered pair constructor constrained to apply a singleconstant name to sequences of combinators of any cardinality. We can therefore go immediately tospecification of the required closure condition for the syntax.

The closure condition is:HOL Constant

CrepClosed: 1a GSU SET Ñ BOOL

@ s CrepClosed s ô

p@c i Funu i ^ Ordinalu pDomu iq ^ X u pRanu iq s ñ c ÞÑu i P sq

The well-formed syntax is then the smallest set which is CrepClosed.HOL Constant

Csyntax : 1a GSU SET

Csyntax tx | CrepClosed xu

crepclosed csyntax lemma

$ CrepClosed Csyntax

crepclosed csyntax thm

$ @ c i Funu i

^ Ordinalu pDomu iq

^ p@ x x P X u pRanu iq ñ x P Csyntax q

ñ c ÞÑu i P Csyntax

crepclosed csyntax thm2

$ @ c i Funu i

^ Ordinalu pDomu iq

^ p@ x x Pu Ranu i ñ x P Csyntax q

ñ c ÞÑu i P Csyntax

crepclosed csyntax thm3

$ @ c i Sequ i ^ p@ x x Pu Ranu i ñ x P Csyntax q

ñ c ÞÑu i P Csyntax

7

Page 8: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

crepclosed csyntax lemma1

$ @ s CrepClosed s ñ Csyntax s

crepclosed csyntax lemma2

$ @ p CrepClosed tx |p xu ñ p@ x x P Csyntax ñ p x q

3.1.1 Recursion and Induction Principles and Rules

We need to be able to define functions by recursion over this syntax. To do that we need to provethat the syntax is well-founded. This is the case relative to the transitive closure of the membershiprelation, but to get a convenient basis for reasoning inductively over the syntax and for definingfunctions by recursion over the syntax it is best to define an ordering in terms of the syntacticconstructors for the syntax.

This could be done strictly over the well-formed syntactic constructs, but this would involve morecomplexity both in the definitions and in subsequent proofs than by defining it in terms of thesyntactic constructors whatever they are applied to.

HOL Constant

CscPrec : 1a GSU REL

@α γ CscPrec α γ ô Dc i α Pu pRanu iq ^ γ c ÞÑu i

CscPrec tc P thm

$ @ x y CscPrec x y ñ tc $Pu x y

well founded CscPrec thm

$ well founded CscPrec

well founded tcCscPrec thm

$ well founded ptc CscPrecq

Using the well-foundedness theorems we can define tactics for inductive proofs.

SML

val CSC INDUCTION T WFCV INDUCTION T well founded CscPrec thm;

val csc induction tac wfcv induction tac well founded CscPrec thm;

csc fc thm

$ @ x x P Csyntax ñ

pDc i Funu i ^ OrdinalupDomu iq

^ p@ y y Pu Ranu i ñ y P Csyntax q

^ x c ÞÑu iq

8

Page 9: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

Hu P csyntax lemma

$ Hu P Csyntax

Hu P csyntax lemma2

$ @ x x P Csyntax ñ x Hu

Hu P csyntax lemma3

$ @ V x x P V ^ V Csyntax ñ x Hu

csc fc thm2

$ @c i c ÞÑu i P Csyntax ñ Funu i ^ Ordinalu pDomu iq

^ p@ x x Pu pRanu iq ñ x P Csyntax q

cscprec fc thm

$ @ c i x x Pu Ranu i ñ CscPrec x pc ÞÑu iq

Inductive proofs using the well-foundedness of ScPrec are fiddly. The following induction principlesimplifies the proofs.

csyn induction thm

$ p@c i Funu i ^ OrdinalupDomu iq

^ p@x x Pu pRanu iq ñ x P Csyntax ^ p x q

ñ p pc ÞÑu iqq

ñ p@ x x P Csyntax ñ p x q

Using this induction principle an induction tactic is defined as follows:

SML

fun icomb induction tac t pa,cq p

let val l1 mk app pmk λ pt ,cq, tq

and l2 mk app pmk app pmk const p"P", p:1a GSU Ñ 1a GSU SET Ñ BOOLqq, tq,

mk const p"Csyntax", p:1a GSU SETqqq

in let val l3 mk @ pt , mk ñ pl2 , l1 qq

in LEMMA T l1 prewrite thm tac o rewrite rulersq

THEN DROP ASM T l2 ante tac

THEN LEMMA T l3 prewrite thm tac o rewrite rulersq

THEN bc tac rcsyn induction thms

THEN rewrite tacrs

THEN strip tac

end endq pa,cq;

This tactic expects an argument t of type TERM which is a free variable of type p : p1aqGSU qwhose sole occurrence in the assumptions is in an assumption p pMLt q P Csyntax q , and results ina single subgoal. The conclusion of the subgoal is as in the original except that free occurrences ofpt q have been replaced by pc ÞÑ ui q . The assumption p pMLt q P Csyntax q is replaced by three newassumptions asserting that pi q is a function, that its domain is an ordinal, and that everything inits range is a member of Csyntax for which the property expressed in the conclusion holds.

9

Page 10: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

A slight variant on that is:

csyn induction thm2

$ p@c i Sequ i

^ p@x x Pu pRanu iq ñ x P Csyntax ^ p x q

ñ p pc ÞÑu iqq

ñ p@ x x P Csyntax ñ p x q

SML

fun icomb induction tac2 t pa,cq p

let val l1 mk app pmk λ pt ,cq, tq

and l2 mk app pmk app pmk const p"P", p:1a GSU Ñ 1a GSU SET Ñ BOOLqq, tq,

mk const p"Csyntax", p:1a GSU SETqqq

in let val l3 mk @ pt , mk ñ pl2 , l1 qq

in LEMMA T l1 prewrite thm tac o rewrite rulersq

THEN DROP ASM T l2 ante tac

THEN LEMMA T l3 prewrite thm tac o rewrite rulersq

THEN bc tac rcsyn induction thm2 s

THEN rewrite tacrs

THEN strip tac

end endq pa,cq;

This tactic expects an argument t of type TERM which is a free variable of type p : p1aqGSU qwhose sole occurrence in the assumptions is in an assumption p pMLt q P Csyntax q , and results ina single subgoal. The conclusion of the subgoal is as in the original except that free occurrences ofpt q have been replaced by pc ÞÑ ui q . The assumption p pMLt q P Csyntax q is replaced by threenew assumptions asserting that pi q is a sequence, and that everything in its range is a member ofCsyntax for which the property expressed in the conclusion holds.

csyntax pair thm $ @ t t P Csyntax ñ pD c ts t c ÞÑu tsq

The following function provides domain restriction of a function over p : 1a GSU q . Since this is anoperation on total functions, the effect is achieved by delivering a function which returns the samevalue for all arguments outside the restricted domain. The purpose is to constrain recursion to bewell founded, so the possibility of returning a function completely unconstrained in what it does offthe restricted domain does not suffice (we would not be able to prove that the domain restrictionhad done anything at all). The domain is a set, but the constraint is to its transitive closure.

SML

declare infix p310 , "Cue"q;

HOL Constant

$Cue : 1a GSU Ñ p1a GSU Ñ 1bq Ñ p1a GSU Ñ 1bq

@s f s Cue f λt if t Pu s then f t else εx T

A recursion lemma suitable for consistency proofs of primitive recursive definitions over our syntaxcan now be proven, this supports definition by primitive recursion of functions over the syntax.

10

Page 11: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

csc recursion lemma

$ @af Df @c i f pc ÞÑu iq af pi Cue f q c i

This is (when proven) plugged into proof context ’icomb for use in consistency proofs.

SML

add D cd thms rcsc recursion lemmas "1icomb";

set merge pcs r"misc31", "1icomb"s;

This is just to test the recursion theorem.

HOL Constant

CscRank : 1a GSU Ñ 1a GSU

@c i CscRank pc ÞÑu iq

u pImagepu Sucu ppImagepu pi Cue CscRankqq pRanu iqqq

3.1.2 More Closure Properties

In order to prove that various expressions yield elements of Csyntax further definitions and theoremsare required.

The construction of terms is accomplished primarily by the construction of sequences of terms. Forconcision in expressing closure conditions of operators over such sequences we give a name for asequence of terms in our syntax.

HOL Constant

CscSeq : 1a GSU Ñ BOOL

@s CscSeq s ô Sequ s ^ @t t Pu Ranu s ñ t P Csyntax

3.1.3 Finitary Constant Combinators

Our syntax does not include the standard finitary application, to do this you have to append theargument to the sequence of arguments already present on the function. It’s handy to define afunction in HOL which does this operation (i.e. which constructs the required combinatory term).For this we will use an infix bare subscript c.

SML

declare infix p350 , "c"q;

HOL Constant

$c : 1a GSU Ñ 1a GSU Ñ 1a GSU

@f a f c a let fc Fstu f

and fa Sndu f

in fc ÞÑu pfa @u pUnitu pHu ÞÑu aqqq

11

Page 12: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

We also define a function corresponding to a constant constructor. This requires the constant ‘name’as argument and returns a combinator with that name at the head and an empty list of arguments.

HOL Constant

$MkCcon : 1a GSU Ñ 1a GSU

@n MkCcon n n ÞÑu Hu

MkCcon P Csyntax thm $ @ x MkCcon x P Csyntax

Using which we name the primitive combinators.

We use an initial segment of the natural numbers as the names of combinators in the infinitaryobject langauge, but we give more intuitive names in our metalanguage (HOL) for the resultingcombinatory term.

First two finitary pure combinators:

HOL Constant

Sc : 1a GSU

S c MkCcon pNatu 0 q

HOL Constant

Kc : 1a GSU

K c MkCcon pNatu 1 q

Then the sole illative combinator, which is equality or equivalence.

HOL Constant

$c : 1a GSU

$c MkCcon pNatu 2 q

Various useful combinatorial expressions may now be named.

I λx x

HOL Constant

$Ic : 1a GSU

I c pS c c K cq c K c

The truth values may be represented as two projections from the argument list.

T λx y x

12

Page 13: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

HOL Constant

$T c : 1a GSU

T c K c

F λx y y

HOL Constant

$F c : 1a GSU

F c K c c I c

Conditionals may then be represented by applying the condition to the two alternatives:

if x then y else z xyz

HOL Constant

$Ifc : 1a GSU Ñ 1a GSU Ñ 1a GSU Ñ 1a GSU

@x y z If c x y z px c yq c z

Natural numbers may be represented as iterators (though this is unlikely to be how they are repre-sented in the target illative lambda calculus):

Thus, zero is the identity function.

HOL Constant

$0c : 1a GSU

0 c I c

Suc n λf x f ppn f qx q

λf λx f ppn f qx q

λf S pK f q pn f q

S pλf S pK f qq n

S pS pK S q K q n

λf ppS pK S q K q f q pn f q

λf ppλx ppK S q x q pK x qq f q pn f q

λf ppλx S pK x qq f q pn f q

λf S pK f q pn f q

λf x ppK f x q ppn f q x qq

λf x f ppn f q x q

HOL Constant

$Succ : 1a GSU

Succ S c c pS c c pK c c S cq c K cq

13

Page 14: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

However, we require a representation of transfinite ordinals. It is not clear how this could be obtainedas iterators.

It is probable that arithmetic will be arrived at in a manner more similar to that adopted in a well-founded set theory. Such a set theory could be derived within the target illative lambda-calculus asa theory of characteristic functions, provided that we have a sufficiency of such functions, which theinfinitary combinators are intended to ensure.

3.1.4 Infinitary Combinators

The idea is to get a system which is ontologically equivalent to the standard interpretations of well-founded set theory with large cardinal axioms. By equivalent here I mean something like mutuallyinterpretable, but the interpretations at stake here are correspondences between the ontologies, notinterpretability of theories. However, this is the case without the infinitary combinators, so what Iam looking for is a bit more.

I want to ensure that the functions available as combinators are all functions with small graphs (anda decent collection of those with large graphs, but they are not our present concern). The infinitarycombinators are introduced to permit a function to be defined in extension, so long as its graph is“small” (i.e. smaller than the universe of discourse).

It is not entirely straightforward to do this. The present proposal is to use three infinitary combina-tors.

First an inert combinator which is used to construct lists or sequences.HOL Constant

$Φc : 1a GSU Ñ 1a GSU

@s Φc s pNatu 3 q ÞÑu s

Such combinators are irreducible and injective, and it is therefore possible in principle to extract thecomponents, for which we supply the following projection combinator.

The projection combinator takes two sequences, the first effectively determining an element of thesecond to be extracted. Normally this would be supplied with two sequences of equal length and theelement to be extracted from the second would be the one which corresponds to the first element ofthe first sequence which reduces to ‘T’, provided that all previous values reduce to ‘F’ (otherwise noelement is selected, i.e. no reduction is possible).

HOL Constant

$Ωc : 1a GSU

Ωc MkCcon pNatu 4 q

One may think of the first sequence supplied as an argument to Ωc as an ordinal α and of Ωc c α c βas selecting the αth element of β, but when we do eventually come to the theory of ordinals we willnot use this representation. Furthermore note that this way of indicating the element to be selectedis determined primarily because it is convenient for constructing infinitary ‘case’ constructions, andhence for the definition of arbitrary functions.

To achieve this effect we need one further infinitary combinator, a mapping combinator.

This combinator expects its second argument to be a sequence, and maps its first argument over theelements of the sequence, returning a sequence which consists of the elements of the original sequence

14

Page 15: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

transformed by the function supplied as the first argument. Of course, the intended “transformation”will only take place as the combinators in the new sequence are themselves reduced, the reductionarising from this combinator is just to apply the function to each element giving a sequence ofapplications.

HOL Constant

$Ψc : 1a GSU

Ψ c MkCcon pNatu 5 q

These three combinators together may be used to define a function as a graph in the followingway. Form two corresponding sequences, the first of values in the domain of the desired function,the second having at each position the value of the function at that point. The required functiontakes some value px q , and maps p c x q over the first argument, and then uses that list todetermine which value to select from the second list. The effect of the mapping operation is to createa sequence in which every element is the truth value of the claim that it is equal to the argumentpx q , which, provided that all terms normalise will be the a representation of the position in the listof the argument, which can then be used to select the required value from the other sequence.

An infinitary case combinator might therefore be obtained from these three combinators as follows.

Gfunc λx y z Ω c pΨ c p c z q c x q c y

It is not expected that this will ever be done, it is important only that it could be done (if only bysome inaccessibly infinite deity), and this is intended to ensure that we can do ‘classical’ mathematicsin pretty much the normal way within our target calculus, which will probably be demonstrated byreconstructing a strong set theory within it. The ability to represent arbitrary functions on infinitedomains (e.g. over the reals) by such means depends upon the axiom of choice, which we do have atour disposal. It is intended also that the target illative lambda calculus will benefit (or perhaps insome eyes be blighted by) a choice principle.

MkCcons P Csyntax clauses $ S c P Csyntax

^ K c P Csyntax

^ $c P Csyntax

^ T c P Csyntax

^ Ωc P Csyntax

^ Ψ c P Csyntax

3.2 Semantics

The following semantics is a first crude cut. Conceivably it might be ‘correct’ but certainly it is notvery nicely structured. A good structure is only likely to emerge as I get a handle on the proofs Ineed to do with it.

The semantics which follows must be in effect a monotone functor, so that we can obtain a leastfixed point. In my previous attempts for a non well-founded set theory I used truth functions into asuitably ordered four-valued set of truth values, but in this case a simpler approach seems possible,in which we use a functor over standard bi-valent relations, ordered by inclusion (of the set ofordered pairs of which the relation is the characteristic function). The relation in question is that ofconvertibility.

15

Page 16: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

To understand how this works it is best to think of it in other terms, as a partial equivalencerelation. A partial equivalence relation is one for which some pairs are equivalent and some pairs arenot equivalent, and the status of others is unknown. The relation we work with will be the positivepart of this partial equivalence relation. However, it will contain coded within it also the negativepart.

This encoding occurs through the conversions for applications of the equivalence combinator. Theequivalence combinator is intended to be the relation of convertibility, but for reasons connected withthe paradoxes it cannot be total. This is because the notion of convertibility at stake involves theconversions for equivalence expressions, and so the dependency is recursive. Defining convertibilityas the least fixed point of our functor gives is recursive definition which will fail to be well-foundedfor some pairs of combinators. For these pairs, equivalence will not reduce, and it will therefore bea partial equivalence relation.

The functor is defined in two parts, respectively for the positive and the negative parts of theconvertibility relation. The two are then put together.

The positive part is an equivalence relation which ultimately corresponds exactly to convertibility.

The negative part is an approximation to distinctness, but there will be some pairs of terms whichare not convertible which never appear in the negative part (possibly because if they did, they wouldthen appear also in the positive part engendering contradiction, this is what we would expect tohappen with the assertion that the Russell set is a member of itself, if it comes out true, then it willalso come out false).

The negative part plays a role in the definition of the positive part, because an application of anequivalence combinator reduces to F c only if the two arguments are related under this negative partof the partial equivalence relation.

Of course, the negative part is not itself an equivalence relation. The requirement that the whole(both the positive and the negative parts) is a partial equivalence relation is simply the usual condi-tions (reflexive, symmetric and transitive), on the positive part. We also require that the two partsdon’t disagree!

We consider the definition in two parts, the positive part and the negative part.

The positive part of the functor is a functor which takes a convertibility relation, closes it up underall the direct conversions for combinators other than the equivalence combinator. The negative partthen computes a set of inequalities from this convertibility relation. The postive and negative partsare then incorporated into the relation as conversions of equations.

positive part The positive part is defined in three stages.

First direct reduction is defined for the Pure combinators . These are combined into a closure oper-ator which obtains from any relation the smallest equivalence relation closed under direct reductionsubject to a rule of extensionality (equivalent functions applied to equivalent arguments give equiv-alent combinators). In this context the pure combinators are those for which direct reduction isdefinable independently of the other combinators.

The second stage is the definition of direct reducibility for the illative equivalence combinator, whichis done relative to some given partial equivalence relation.

The third stage is to combine the two previous definitions into a partial functor, which takes apartial equivalence relation and delivers the positive part of a partial equivalence relation. It doesthis by applying the definition of direct reducibility of equivalence to the partial equivalence to geta first version of the positive part, and then closing this under the closure operator obtained from

16

Page 17: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

the definitions of the other combinators.

negative part There are two parts to this.

Firstly a fixed part under which all constants are known to be distinct.

Secondly we infer that two combinatorial expressions are distinct if when applied to equal argumentsthey yield distinct results. To obtain such results you need to have both positive and negative results,so this part has to be defined as a function over a partial equivalence relation.

I now see that the negative part is derivable from the positive part, in which it is incorporated asreductions of equations to F c. Its not obvious whether it is better to extract the information in thatway or to maintain it separately as I first set out to do. I will hedge my bets a bit until I get astronger sense of which is the best way to go.

3.2.1 The Combinators

We have five combinatory constants, S, K, (convertability), Ω (projection), and Ψ (map), of whichthe last two are infinitary, the first three being much the same as you would expect in a finitaryillative combinatory logic in which the illative primitive is equality.

The rationale for this is that the infinitary aspect is of marginal significance, and may be thoughtof as supplying strength, just as in the role of large cardinals in set theory, the strength is boundup with ontological plenitude. It should be like an afterthough, the main features of the systemshould arise in the finitary case from the first three combinators, and the principle innovation is inthe approach to giving meaning to .

The definitions of the pure combinators (all except ) are given as conversion rules, whose reflexivesymmetric transitive closure give a first approximation to the meaning of . If we assume given somemeaning for and obtain from it a second version by combining it with the conversion rules for theother combinators, then we have a functor over possible meanings for , which will be monotone.The least fixed point will then be used to determine the semantics of the infinitary combinatorylogic.

3.2.2 Direct Conversions for the Pure Combinators

These are defined as relations over Csyntax.

SML

declare type abbrevp"RED", r"1a"s, p:1a GSU Ñ 1a GSU Ñ BOOLqq;

HOL Constant

Kred : 1a RED

@s t Kred s t ô Dx y s pK c c x q c y ^ t x

HOL Constant

Sred : 1a RED

@s t Sred s t ô Dx y z s ppS c c x q c yq c z ^ t px c z q c py c z q

17

Page 18: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

The projection combinator is more complicated.

HOL Constant

Ωred : 1a RED

@s t Ω r ed s t ô pDk l m n Domu k Domu m

^ Ordinalu pDomu kq ^ Ranu k Unitu F c

^ s Ωc c pΦc pk @u lqq c pΦc pm @u nqq

^ t Ωc c pΦc lq c pΦc nqq

_ pDk m Hu ÞÑu T c Pu k

^ Hu ÞÑu t Pu m

^ s Ωc c pΦc kq c pΦc mqq

As is the infinitary “map”.

HOL Constant

Ψred : 1a RED

@s t Ψ r ed s t ô Df l m Domu l Domu m

^ Ordinalu pDomu lq

^ m pλu x f c x qpDomu lq

^ s pΨ c c f q c pΦc lq

^ t Φc m

Direct combinatorial reducibility is the union of these relationships. Because the infinitary com-binators are so much more complex than the finitary combinators in ways which are probably notpertinent to the method of defining equivalence, I propose to separate out the two kinds of reduction,and undertake the development in the first instance using only the finitary part.

The finitary combinators yield this notion of reducibility:

HOL Constant

DComRed : 1a RED

@s t DComRed s t ô Kred s t _ Sred s t

With the following for the infinitary combinators, which we will consider no further until we havedemonstrated the viability of our method using only the finitary combinators.

HOL Constant

DiComRed : 1a RED

@s t DiComRed s t ô Ω r ed s t _ Ψ r ed s t

HOL Constant

DbComRed : 1a RED

@s t DbComRed s t ô Kred s t _ Sred s t _ Ω r ed s t _ Ψ r ed s t

18

Page 19: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

3.2.3 Extraction of Negative Part

Since the negative part of the partial equivalence relation (and the positive part for that matter) isencoded in the positive part through reductions of equivalences, it is possible to recover it from thepositive part.

This is how it is done:

HOL Constant

Np : p1a REDq Ñ p1a REDq

@r Np r λx y r pp$c c x q c yq F c

This just says that two terms are distinct if the equivalence between them converts to F c.

3.2.4 Equality

We now consider the question, when can we know that two combinators are equal or not equal.

The first obvious principle is that if two combinators are convertible then they are equal. We cannotadopt the converse principle, that two combinators which are not convertible are distinct, becausethe equality conditions feed into the conversion rules through the equality combinator. So we haveto have some definite criteria for distinctness which we are confident will not include any combinatorpairs which might ever be found to be convertible.

There are three parts to these criteria for distinctness.

The first part is that all the constants are to be considered distinct. This is consistent with thereduction rules for those constants to which we assign a definite meaning.

This provides an initial value for the inequality relation.

HOL Constant

Ineq0 : 1a RED

Ineq0 λx y Dv w x MkCcon v ^ y MkCcon w ^ v w

The second part is that if two combinators when applied to equal lists of arguments reduce tocombinators which are known to be distinct, then they are themselves distinct.

We need a closure operation which will take a notion of inequality and add to it any further in-equalities which are immediately apparent from that inequality relation using the second rule justcited.

HOL Constant

EqSeq : p1a REDq Ñ p1a REDq

@eq EqSeq eq λv w Funu v ^ Funu w ^ Domu v Domu w ^ Ordinalu pDomu vq

^ @x x Pu Domu v ñ eq pv u x q pw u x q

19

Page 20: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

HOL Constant

IneqStep : p1a REDq Ñ p1a REDq

@eq IneqStep eq λx y Ineq0 x y _ Np eq x y

_ Dv w EqSeq eq v w ^ Np eq px c vq py c wq

3.2.5 Illative Reduction

Reduction for the illative combinator c is intended to encapsulate reducibility as a whole. We coulddefine such a notion here in terms of closure of the reducibility relation for the pure combinators, butthis would fall short of the entire reducibility relation by not recognising the reductions it introduces.The definition needs to be recursive, reducibility needs to be defined in terms of itself.

Such a recursive definition can be realised by taking a fixed point of a functor which defines reducibil-ity given some supposed definition of reducibility.

In constructing such a functor we need to specify the reductions which take place on applicationsof the equality combinator, which will be done using the supplied equivalence relation. This willbe a partial relation in the form of two disjoint relations, one positive and one negative. If thepositive relation holds over the arguments the equation reduces to T c if the negative relation holdsthe equation reduces to F c.

HOL Constant

EqStep : p1a REDq Ñ p1a REDq

@eq EqStep eq λv w Dc i1 i2 c ÞÑu i1 P Csyntax ^ c ÞÑu i2 P Csyntax

^ Domu i1 Domu i2 ^ p@x x Pu Domu i1 ñ eq pi1 c x q pi2 c x qq

HOL Constant

red : p1a REDq Ñ p1a REDq

@eq r ed eq λx y Dl m x pp$c c lq c mq

^ pEqStep eq x y ^ y T c _ IneqStep eq x y ^ y F cq

3.2.6 Closure

There must be a name for this.

I have two versions, not sure yet which to use.

HOL Constant

RedClosed1 : p1a REDq Ñ BOOL

@r RedClosed1 r @c i1 i2 c ÞÑu i1 P Csyntax ^ c ÞÑu i2 P Csyntax

^ Domu i1 Domu i2 ^ p@x x Pu Domu i1 ñ r pi1 c x q pi2 c x qq

ñ r pc ÞÑu i1 q pc ÞÑu i2 q

20

Page 21: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

HOL Constant

RedClosed2 : p1a REDq Ñ BOOL

@r RedClosed2 r @c d e f g h c ÞÑu e P Csyntax ^ d ÞÑu f P Csyntax

^ r pc ÞÑu eq pd ÞÑu f q ^ EqSeq r g h

ñ r pc ÞÑu e @u gq pc ÞÑu f @u hq

I’ll use them both pro-tem.

HOL Constant

RedClosure : p1a REDq Ñ p1a REDq

@r RedClosure r Snd pEquivClosure

pCsyntax , λx y @r1 RedClosed1 r1 ^ RedClosed2 r1 ^ pCsyntax , rq pCsyntax , r1 q

ñ r1 x yqq

3.2.7 The Semantic Functor

The functor with which we define equivalence must a monotone functor over partial equivalencerelations. It requires, or rather consists of a positive and a negative closure operator, each of whichhas access to the partial equivalence relation and delivers one half of the resulting partial equivalencerelation.HOL Constant

ILamFunct : p1a REDq Ñ p1a REDq

@r ILamFunct r RedClosure pr ed rq

To take a fixed point we define a version of this as an operator over sets.

HOL Constant

ILamFunctS : p1a GSU 1a GSU qSET Ñ p1a GSU 1a GSU qSET

@s ILamFunctS s tx | ILamFunctpλx y px ,yq P sq pFst x qpSnd x qu

3.2.8 Equivalence

Pure infinitary combinatorial equivalence is then:

HOL Constant

PIComEq : 1a GSU SET p1a GSU Ñ 1a GSU Ñ BOOLq

PIComEq EquivClosurepCsyntax , λx y px ,yq P Lfp ILamFunctS q

Equiv PIComEq thm $ Equiv PIComEq

Fst PIComEq thm $ Fst PIComEq Csyntax

CSyntax PIComEq thm $ @ x x P Csyntax ñ x P EquivClass PIComEq x

21

Page 22: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

We now define a set of equivalence classes which will form a new type of combinators.

HOL Constant

PureInfComb : 1a GSU SET Ñ BOOL

@x PureInfComb x ô x P QuotientSet Csyntax pSnd PIComEqq

PureInfComb D lemma

$ @ x x P Csyntax ñ EquivClass PIComEq x P PureInfComb

D PureInfComb lemma

$ D x x P PureInfComb

3.3 Consistency

At this point it is desirable to prove something like the Church-Rosser theorem for this system, sothat we know that not all combinators are equivalent. Since this is probably hard I am exploring abit more before digging in to the proof.

The most doubtful part of the enterprise is not the infinitary combinators. It is the illative combina-tor. So its probably worth working through the handling of the illative combinator in a system withno infinitary combinators, and adding in the infinitary combinators (whose purpose is just to addstrength), when the treatment of the illative combinator has been proven in the simpler context.

HOL Constant

ChurchRosser : p1a Ñ 1a Ñ BOOLq Ñ BOOL

@r ChurchRosser r ô @w x y r w x ^ r w y ñ Dz r x z ^ r y z

I approach the Church-Rosser proofs (loosely) following a method I took from Barendregt [1] (whichhe attributes to W. Tait and Per Martin-Lof). This consists in proving that the transitive closure of aChurch-Rosser relation is Church-Rosser, and then finding a Church-Rosser relation whose transitiveclosure is the desired relation.

The first theorem is:

CrTc thm $ @ r ChurchRosser r ñ ChurchRosser ptc rq

Typically a relation of direct reduction (or its reflexive closure) will not be Church-Rosser. This isbecause a reduction of a redex may replicate some other redex (contained within it). To reduce thatother redex after the first reduction will require more than one reduction. To get a Church-Rosserrelation we need to allow all these ‘residuals’ to be reduced in one step.

I therefore define an operator which takes a relation of direct reduction and makes from it a parallelreduction relation which is more likely to be Church-Rosser. The idea is that any set of redexes inthe term can be reduced in a single step, but that no redex which was not in that original term canbe reduced in that step.

There are (at least!) two ways of defining this relationship.

The first (which is the kind of approach used in Barendregt) is to define it as undertaking a singledepth-first scan of the term reducing any of the redexes.

22

Page 23: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

The second is to devise a representation of a set of redexes and to define the reduction parameterisedby such a set of redexes. The desired relation is then obtained by existentially quantifying over setsof redexes.

I started out with the second approach, but this was rapidly getting too complicated, so I am tryingout the first approach.

They are presented here (so far as they go) in reverse order.

With either of these approaches it is possible to identify a maximal direct reduction of any term. Onecan argue that the relation is Church-Rosser because whatever reduction is undertaken on a term itcan be converted by just one more reduction to the maximal reduct of the original term. Thus foreach term, there is some other term (its maximal reduct), which could serve as the bottom of thediamond whatever two other reducts were considered. One might hope that this observation wouldpermit a simplification of the Church-Rosser proof, but so far I have not found a way to realise thatsimplification.

I shall keep my eye on this as I work through the preliminary stages of the proof.

In the following section I make some steps towards a proof based on coordinates, in the subse-quent section I mentally put this aside and try an approach more closely following one presented byBarendregt.

3.3.1 Approach based on Coordinates

Redexes (or subterms in general) in a combinatorial term can be identified by coordinates, finitesequences of (not necessarily finite) ordinals suffice. We do need to insist that the coordinates arecoordinates of redexes.

I define first the operation of extracting from a combinator the substructure identified by a set ofcoordinates. I use the type LIST for finite sequences. When it comes to selecting a subterm, a termis an ordered pair of which the second element is a sequence of terms (the first is a constant name).The sequence is a function whose domain is an ordinal, so we just apply this sequence to the relevantcoordinate (which is here the head h of the list of coordinates).

HOL Constant

SubTerm : 1a GSU LIST Ñ 1a GSU Ñ 1a GSU

@h t tl SubTerm rs t t

^ SubTerm pCons h tlq t SubTerm tl ppSndu tq u hq

Since this function is total (and therefore will yield junk if there is no subterm addressed by thecoordinates) I also need a test so I know whether a coordinate list does actually point to a subterm.This test assumes that its second argument is a combinatory term, and tests whether the coordinatelist points to a subterm.

HOL Constant

is SubTerm : 1a GSU LIST Ñ 1a GSU Ñ BOOL

@h t tl pis SubTerm rs t ô T q

^ pis SubTerm pCons h tlq t ô

h Pu Domu pSndu tq ^ is SubTerm tl ppSndu tq u hqq

23

Page 24: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

SubTerm in Csyntax lemma

$ @ t t P Csyntax ñ p@ cs is SubTerm cs t ñ SubTerm cs t P Csyntax q

This isn’t quite a sufficient check. It is important that nothing is accepted as a redex unless it really isone, particularly not if it might be turned into one by some other reduction (this is because we don’twant the description of the reductions required to give different results after some other reductionthan before), so the best thing is to use the direct reduction relation to test whether the identifiedsubterms are redexes, i.e. we just check whether the subterm is in the domain of the relationship.

The parameters here are:

r the direct reduction relation

t the combinatory term

cls a set of coordinate lists

and the value is true if all the identified subterms are in the domain of the reduction relation.

HOL Constant

is redex set : 1a RED Ñ 1a GSU Ñ p1a GSU LIST qSET Ñ BOOL

@pr :1a REDq t cls is redex set r t cls ô

@cs cs P cls ñ is SubTerm cs t ^ pDy r pSubTerm cs tq yq

We now need to define the effects of applying some such set of reductions. There are two effects ofinterest. The first of course is the resulting term.

The second is a residual map, which tells us how to find the instances in the new term of the subtermsof the old term. To compute the residual map we assume that a residual map is available for thedirect reduction relation, and use that in computing the residual map function for the derived parallelreduction relation.

The best way to compute the new term is with a depth first traversal. This ensures that redexes forreduction are are not replicated until they have been reduced.

The definition is inductive over the structure of the combinatory terms. At each stage in the recursionthe set of coordinate sequences is filtered by selecting only those which point within the selectedsubterm and chopping the head of those sequences. The reduction of the term takes place after thereduction of its subterms. We assume that the second parameter is a syntactically valid combinatoryterm and that the set of coordinate sequences passes the is redex set test.

The following function restricts a set of coordinates to the relative coordinates of subterms of a givetop-level sub-term, identified by its coordinate.

HOL Constant

cls restrict : p1a GSU LIST qSET Ñ 1a GSU Ñ p1a GSU LIST qSET

@cls pt :1a GSU q cls restrict cls t tv : 1a GSU LIST | Cons t v P clsu

We need direct reduction to be deterministic, i.e. to be a many-one relation. Assuming that it is wecan use the following function to perform a reduction.

24

Page 25: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

HOL Constant

reduce : 1a RED Ñ 1a GSU Ñ 1a GSU

@pr :1a REDq pt :1a GSU q reduce r t

εnt r t nt _ pp Dnt2 r t nt2 q ^ nt tq

We want to map certain operations over terms to be applied at certain locations specified by coor-dinates. Some general combinators might be the best way to achieve this.

We need to obtain from a parallel reduction not only the resulting term but also a map which tells usthe location of any residuals. The function to be mapped over the term must therefore not simply bea function over combinators, but a function which transforms a combinator and delivers a residualmap (which is a kind of map over coordinate lists).

The type of such a function is therefore:

SML

declare type abbrev p"CT", r"1a"s, p:1a GSU Ñ p1a GSU p1a GSU LIST Ñ 1a GSU LIST qqqq;

We could build into the mapping function the means of composing the resulting coordinate trans-formers obtained in the traversal, but it is better to supply that as a parameter. The type of such aparameter would be:

SML

declare type abbrev p"CC", r"1a"s, p:p1a GSU p1a GSU LIST Ñ 1a GSU LIST qq LIST

Ñ 1a GSU LIST p1a GSU LIST Ñ 1a GSU LIST qqq;

HOL Constant

depth map aux : p1a GSU Ñ 1a GSU q Ñ 1a GSU Ñ p1a GSU LIST q SET Ñ 1a GSU

@f c ts depth map aux f pc ÞÑu tsq λcls

let newts

Imagepu pλop Fstu op ÞÑu pts Cue depth map aux f q

pSndu opq pcls restrict cls pFstu opqqq ts

in if rs P cls then f pc ÞÑu newtsq else c ÞÑu newts

HOL Constant

depth map : p1a GSU Ñ 1a GSU q Ñ p1a GSU LIST qSET Ñ 1a GSU Ñ 1a GSU

@f cls t depth map f cls t depth map aux f t cls

This function defines the term which results from a parallel reduction.

HOL Constant

par reduce : 1a RED Ñ p1a GSU LIST qSET Ñ 1a GSU Ñ 1a GSU

@r c ts cls par reduce r cls pc ÞÑu tsq

depth map preduce rq cls pc ÞÑu tsq

25

Page 26: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

We need to be able to compute residual maps which show where to find the residuals of each redexafter a (parallel) reduction. It is probably easier just to map the movement of all combinationsirrespective of whether they are redexes. I think functions from coordinate sets to coordinate setswill probably do the trick. We suppose that the direct reductions are specified both as a relation andas a residual map. We can then compute a residual map for a parallel reduction by composing thesemaps in a manner which corresponds to the depth first traversal which defines the parallel reductionderived from some direct reducibility relation.

We then prove for each direct reduction a commutativity result, which says that performing somereduction before that direct reduction is equivalent to applying that reduction to each of the residualsafter the direct reduction. Next I prove that combining direct reductions preserves this property,and finally that lifting to parallel reduction gives a similar commutativity for the resulting parallelreduction.

From this to the diamond property should be straightforward, which then applies to the transitiveclosure which is close to the desired reduction relation. This approach gives Church-Rosser for allby the equivalence combinator.

I then define a functor which takes a value for a direct equivalence reduction satisfying the relevantcommutativity property, and yields a Church-Rosser reduction relation incorporating the other com-binators, and a new notion of equivalence hopefully also commutative. The functor will be monotone,and its least fixed point will be the final reduction relation, which will be a limit of Church-Rosserrelations. So then I need to prove that the functor some relevant continuity property so that its leastfixed point is also Church-Rosser.

3.3.2 More closely following Barendregt

The previous approach looks too complex. Eventually I returned to Barendregt for better ideas. Mymain reason for not following him more closely had been that he works with systems which containvariables, whereas I am working with a system which lacks variables. However, it now occurs to methat I can do with “inert” combinators the kinds of thing which are normally done with free variables,and so it is plausible that following Barendregt more closely will be possible. The signficance of thisis that variables provide a simple way to track residuals, and the main complexity arising from myprevious proof ideas arose from tracking residuals so that a deferred reduction can be completed atall the instances.

Barendregt leaves the Church-Rosser proof for combinatory logic as an exercise (exercise 7.13), soit ought to be manageable, even perhaps with the added complications here. Before noting thecomplications I consider the clues available in Barendregt on how to do the exercise.

There is an earlier proof that beta reduction in the lambda-calculus is Church-Rosser in Chapter 3(Theorem 3.2.8), which can be simplified to give the proof for combinatory logic. The approach isto define a restricted notion of beta reduction whose transitive closure is CR and to prove that thismore restrictive notion is CR. The particular reduction used for the lambda calculus cannot be usedfor combinatory logic, but Barendregt suggests instead the reduction which allows parallel reductionof any disjoint set of redexes.

The plan here is to do a version of that adapted to our infinitary combinators, and follow throughin the spirit of the proof for beta reduction in Chapter 3.

In addition to allowing for infinitary combinators, we have to parameterise the proof to work withany notion of direct reduction which satisfies certain conditions, so that we can then apply it tosystems involving illatory combinators. Exactly what these conditions should be is not yet clear,but I propose to start by trying something analogous to Barendregt’s Lemma 3.2.4 which may be

26

Page 27: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

paraphrase as “reduction commutes with substitution”.

So we start with the definition of disjoint parallel reduction, which is given as an operator overrelations.HOL Constant

disj par reduce : 1a RED Ñ 1a RED

@r c ts nt disj par reduce r pc ÞÑu tsq nt ô

r pc ÞÑu tsq nt

_ Dts 1 p@i v i ÞÑu v Pu ts

ô Dv 1 i ÞÑu v 1 Pu ts 1

^ ppts Cue pdisj par reduce rqq v v 1 _ v 1 vqq

^ pDi v v 1 i ÞÑu v Pu ts ^ i ÞÑu v 1 Pu ts 1

^ ppts Cue pdisj par reduce rqq v v 1qq

^ nt pc ÞÑu ts 1q

The first result I need to prove is that disjoint parallel reduction commutes with substitution, providedthat direct reduction does. So I need to define substitution. We have no variables so the substitutionin question is substitution for a combinator, which with these infinitary combinators is not quite asstraightforward as with the traditional combinators, it invoves concatenating the list of argumentsin the two expressions involved.

In the intended applications substitution is for inert combinators only, but we do not need to takethat into consideration in the definition of substitution. In the following:-

• the first argument is the name of the combinator for which the substitution is being made (notactually a combinatory term, just the name)

• the second is the combinatory term which is being substituted for that combinator, and

• the third is the combinatory term into which substitution takes place.

HOL Constant

subs : 1a GSU Ñ 1a GSU Ñ 1a GSU Ñ 1a GSU

@ cn c ts s subs cn s pc ÞÑu tsq

if c cn

then pFstu s ÞÑu ppSndu sq @u pRanMapu pts Cue psubs cn sqq tsqqq

else pc ÞÑu pRanMapu pts Cue psubs cn sqq tsqq

r disj par thm $ @ r x y x P Csyntax ^ r x y ñ disj par reduce r x y

We do now need the notion of an inert combinator, relative to some notion of reduction. This takes areduction and returns a property of combinator names which is satisfied only be combinators whichare never reduced by the reduction.HOL Constant

inert : 1a RED Ñ 1a GSU Ñ BOOL

@ r c inert r c ô D ts c1 ts 1 r pc ÞÑu tsq pc1 ÞÑu ts 1q ^ c c1

27

Page 28: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

inert disj par thm $ @ r cn inert pdisj par reduce rq cn ô inert r cn

The property of reductions that they commute with substitution is now definable.

HOL Constant

comm subs : 1a RED Ñ BOOL

@ r comm subs r ô @cn inert r cn ñ

@ s t t2 s P Csyntax ^ t P Csyntax

ñ r t t2

ñ r psubs cn s tq psubs cn s t2 q

The following theorem states that substitution commutes with disjoint parallel reduction if it com-mutes with direct reduction.

3.3.3 Proof Strategy

The strategy is, first prove a Church/Rosser theorem for the pure part of the infinitary combinatorylogic, i.e. the bit without the equivalence combinator reductions. Then do the rest, which we won’tthink about yet (much).

A Church/Rosser theorem was first proved for the λ-calculus by Church and Rosser[2]. The resultwe require here should be simpler to produce because we have only a combinatory logic. However,the adoption of an infinitary system naturally complicates matters, though possibly not greatly.

The following proof strategem is new, so far as I am aware. The need to completely formalise theproof forces one to be more definite about certain things, which at first glance may seem to imposeadditional difficulties, but ultimately may assist in finding a nice proof.

The required result is rather like a commutativity result for combinatory reduction, like saying thatthe order of reduction is not very significant. To state exactly what that means in this context is notso straightforward as it is to state the commutativity of addition in arithmetic. The result obtainsnot because of any peculiarities of the specific reductions under consideration, but simply becausethey are combinatory, or some such relatively simple characteristic which they share. It would holdif they were purely combinatory, as S and K are, but we also have combinators which are not quiteso pure, the projection combinator and the equivalence combinator. For these, being ‘nearly purecombinators’ in some sense to be defined, will have to suffice.

The respect in which the map and projection combinators deviate from being purely combinatory isthat they are not entirely careless as to their arguments. A pure combinator, in the sense in whichS and K and anything composed from them is a pure combinator, apply irrespective of the valuesof their arguments, just so long as there are enough of them, and they deliver results in which theirarguments are replicated whole (or not replicated at all) without being in any way modified. Theprojection combinator is fussy about the value of its first argument, which serves to stipulate anelement of its second arguments which is to be extracted. The map combinator is not fussy aboutthe values of its arguments, but it mangles the first rather than merely replicating it. The featurewhich saves these is that they nevertheless ‘respect reducibility’, but unfortunately that is a difficultcharacteristic to define in this context and so some simpler sufficient condition for their admissibilityis desirable. Perhaps that they are sensitive only to a part of their argumenst which is in normalform, and something else about how the map combinator forms its result.

The relevance to the Church Rosser theorem is that performing reductions on operands will have

28

Page 29: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

very limited effects on the permissible reductions of the whole, the same reductions will be possibleand the only effect is on the copies of that operand in the resulting structure.

With the projection combinator, an initial segment of the operands must normalise before reductioncan take place, and the reduction is sensitive to the value of the selector. The sensitivity is thereforesafe, insofar as the relevant values cannot possibly change if the reduction is deferred. We couldtherefore stipulate that a reduction has a pattern (or more than one) which is a combinatory structurein which the only parts which are not variables are normal terms. However, the notion of normalterm depends upon all the reductions so this is not an easy thing to include in the criteria, perhapsit would be better just to allow T and F . That would be OK for the projection combinator, but notfor equivalence.

Equivalence does not reduce without inspecting the operands, and does not look for T or F , or fornormality. Its saving grace is that if, while reduction is deferred, one of two identical operands isreduced, then it will be possible to reduce the other to make the two operands equal again and effectthe reduction of the equality at a later date.

In order to be able to express the precise sense in which these reductions commute, it is necessaryto say what a reduction is, what it operates on and what it does in manner which makes it possibleto talk about effecting the same reduction either before or after some other transformations. Thismeans that we have to include sufficient information when undertaking a transformation to knowhow to apply the same reduction either before or after. The most important element of this is keepingtrack of so called ‘residuals’, i.e. keeping track of what happens to redexes of interest when they aremoved about by some reduction.

This is achieved using a system of coordinates. A coordinate determines a place in a combinatoryterm and a constituent combinator which occurs within the first combinator. When a reduction takesplace, it does so by reduction of an occurrence which may be identified by such a coordinate. Everyconstituent of the combinator which is being reduced may then appear in zero, one, or more thanone place in the result of the reduction. The effect of a reduction on the location of the constituentcombinators may be recorded as a map from locations (as coordinates) to sets of locations. Ifcoordinates are relative then this map can be rendered using relative coordinates.

3.3.4 Representation of Reductions

The natural choice for our calculus, both for absolute and for relative coordinates, is a sequenceof ordinals. This is such a simple notion that one is immediately tempted to go back and startagain using certain maps over sequences of ordinals to represent the combinators. Without prejudiceto whether this should be done, it seems likely to be a good idea to use this representation forcombinatory terms in the proof, which will then be straightforward to transfer back to the presentrepresentation.

We need representative for the following kinds of entity:

• Terms and Coordinates

• Reduction Patterns and applicability

• Reduction effects or transformations

In this calculus, give a suitable notion of coordinate, a combinatory term is determined completelyby a map from coordinates to constant names (or possibly variables, for metatheoretic purposes).A reduction pattern is a combinatory term containing some variables (and subject possibly to other

29

Page 30: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

constraints), and its applicability is determined by a simple matching algorithm. The local effect ofa reduction is a new term and a residual map, which maps each argument number in the originalpattern to the set of relative coordinates at which it appears in the result of the transformation. Fromthe local effect of a reduction, we obtain its global affect, which is the application to a subterm of somelarger combinatory term, and the conversion of the residual map from local to global coordinates.

The representation I propose is a map from coordinates to combinator names or variables (I’m notsure whether I need the variables yet, but we’ll have them in just in case). A combinator is justa value of type p : 1aGSU q , for the variables ordinals of type p : 1aGSU q will do. To code thealternative we enclose a combinator name in two singleton sets so that it cannot be mistaken for anordinal.

So a ‘combinator map’ may be defined as follows.

1. it is a function

2. values in the domain of the function are sequences of ordinals

3. all initial segments of values in the domain are also in the domain

4. if some sequence of ordinals y is in the domain and x is some other sequence of ordinalys whichhas the same length as y and at every point is not greater than y, then it also is in the domain.

HOL Constant

is cmap : 1a GSU Ñ BOOL

@m is cmap m ô Funu m

^ p@x x Pu Domu m ñ Sequ x ^ @y y Pu Ranu x ñ Ordinalu yq

^ p@x y y Pu Domu m ^ Domu x u Domu y ñ x Pu Domu mq

^ p@x y y Pu Domu m ^ Domu x Domu y ^ p@z z Pu Domu x ñ x u z u y u z q

ñ x Pu Domu mq

3.3.5 The Reduction Graph

This is a fresh start, in the exposition. Only after I have written it will I know what to do with thepreceeding material.

The idea is that a combinatory term together with a set of reduction rules determines a directedgraph with labelled nodes and arcs. The nodes and the arcs are labelled by distinct ordinals, togetherwith certain other information.

The other information on a node is a combinatory term. The node labelled zero is special and thecombinatory term is the starting point for the reductions represented by the graph. A location isa position in one of the combinatory terms which appear on nodes of the graph. It consists of thenumber of the node and a coordinate within that term. A location map is a map which assignes toeach term affected by a reduction the new locations.

The arcs are direct reductions, the nodes are combinatory terms together with certain other informa-tion. A direct reduction consists of a direct reduction rule and a location. The other information onthe nodes is a location map, which shows where constituents of ‘earlier’ terms appear in the presentterm, these are sometimes called ‘residuals’.

30

Page 31: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

3.4 Coordinate Set Equivalence

This is a third attempt. It has been too early to write about this, because most of the action istaking place in my head, and the evolution of ideas continually invalidates anything I may previouslyhave written.

In this version coordinates play a larger role so I begin with discussing coordinates.

3.4.1 Coordinates

To refer to specific parts of an infinitary combinatory term we use coordinate systems. Because ofthe infinitary nature, a set of coordinates is a sequence of ordinals. I think that because of the waythe combinatory terms are organised this will always be a finite sequence of ordinals, though theordinals will not in general be finite. (This reflects the well-foundedness of these terms, there couldonly be infinite sequences if there were infinite descending membership chains in the underlying settheoretic representation, the infinitary nature appears, as it were, horizontally.)

A sequence of ordinals may be used to refer to parts of combinatory terms in any of the followingways:

1. In its primary significance the coordinates refer to a sub-term which is the whole of or a partof the term within which the coordinate system is being used. The empty sequence refers tothe whole term. Give a term t referred to by some coordinates c, the coordinates of the αthelement in its argument list consist of the sequence obtained by appending α to c.

2. The coordinates may also be used to refer to a combinatory constant, which would be the oneat the head of the sub-term which is referred to by the coordinates.

3. Coordinates may be use to refer to an application, bearing in mind that in this system thecorrespondence between subterms and applications is broken. In this case you take the sub-term which is referred to by the coordinates, and the application in question is that of whichthe sub-term is the argument. Bear in mind that an infinitary combinatory term is in the senseof application used here, a possibly infinite sequence of applications.

3.4.2 Residuals and Node Formation

In order to be able to talk about effecting the same reduction under differing circumstances (differentpoints in some sequence of reductions), we need a way of describing a reduction which is independentof the details which vary. The signficant changes are changes in location of the redex, taking intoaccount that it may be replicated or eliminated.

The replicas of some term after a reduction of sequence of reductions are called its residuals.

If we identify a reduction by the location of its redex, then to be able to talk about the samereduction being applied before and after some other sequence of reductions it is necessary to treat aredex before some sequence of reductions as equivalent to the complete set of its residuals after thereductions. We are therefore looking for an equivalence relation between sets of sets of coordinatesets. That’s not quite right, the coordinate sets

3.4.3 Reductions

Given a combinatory term and a set of reduction rules, a reduction, which is a sequence of applicationsof the rules, could be represented by a (possibly transfinite) sequence of coordinate sequences, if the

31

Page 32: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

rules are deterministic (which our will be). This will not suffice for an approach to the Church-Rosser theorem based on a conception of reduction which is commutative, because the principle wayin which ‘the same’ reduction might differ when its application is deferred is in the coordinates atwhich the reduction is applied.

3.4.4 Combinatory Direct Reductions

We now define the effects of the primitive pure combinators in two ways. The first is as a transfor-mation on a term represented as a cmap. The second is as a residual map, which shows the newlocations of the subterms of a redex.

The following function assumes that the argument cmap is a K redex, i.e. that its head is K and itsargument list has a length greater than 1.

HOL Constant

K cmap : 1a GSU Ñ 1a GSU

@m:p1aqGSU K cmap m pλu cs

let h Headu cs

and x m u Unitu pHu ÞÑu Huq

in m u

pif pNatu 2 q ¤u h

then let h2 if natural numberu h

then h u pNatu 1 q

else h

in SeqConsu h2 pTailu csq

else if h Natu 1

then Tailu cs

else csqq pGxu mq

HOL Constant

K rmap : 1a GSU Ñ 1a GSU Ñ 1a GSU

@m K rmap m λ cs

let h Headu cs

and x m u Unitu pHu ÞÑu Huq

in pif pNatu 2 q ¤u h

then let h2 if natural numberu h

then h u pNatu 1 q

else h

in SeqConsu h2 pTailu csq

else if h Natu 1

then Tailu cs

else csq

32

Page 33: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

4 Primitives of Illative Lambda Calculus

In this section we define the primitive notions of the Illative Lambda Calculus in terms of theunderlying model of terms as equivalence classes of combinators (represented as sets in GSU).

In the next section the Illative Lambda Calculus will then be developed in a separate theory ab-stracted away from the underlying model.

At this point it is not clear what the primitives should be, so this is exploratory material.

4.1 The Type of Lambda-Terms

SML

val LT def new type defn pr"LT"s, "LT", r"1a"s, D PureInfComb lemmaq;

LT def $ D f TypeDefn PureInfComb f

We will have a new theory for the finitary system, which I will try to confine to results in the finitarysystem. The definitions and proofs will involve materials in the underlying theory, which may wellbe quite substantial. These materials are supplied here, before we start the new theory.

First we need to define functions to take us between the new abstract entities and their representativesas equivalence classes of combinators.

HOL Constant

abs LT : 1a GSU SET Ñ 1a LT ;

rep LT : 1a LT Ñ 1a GSU SET

p@ a abs LT prep LT aq aq

^ p@ r PureInfComb r ô rep LT pabs LT rq rq

^ OneOne rep LT

LT clauses $ p@ a abs LT prep LT aq aq ^ p@ a b rep LT a rep LT b ô a bq

LT fc thm1 $ @ r PureInfComb r ñ rep LT pabs LT rq r

LT fc thm2 $ @ x y PureInfComb x ^ PureInfComb y

ñ pabs LT x abs LT y ô x yq

4.2 Judgements

A proposition is an object of type LT. There is just one true proposition, which is the equivalenceclass containing T c. We will call this T l. To assert a proposition is to identify it with T l.

Something like a sequent calculus might be best.

SML

declare infix p0 , "|ùl"q;

declare infix p0 , "|ù"q;

33

Page 34: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

HOL Constant

$|ùl : 1a LT LIST Ñ 1a LT Ñ BOOL

@pl pp:1a LT q ppl |ùl pq ô @L pMap pλp T c P prep LT pqq plq ñ T c P prep LT pq

SML

declare alias p"|ù", p$|ùlqq;

4.3 Primitive Combinators

HOL Constant

Lift2l : 1a GSU Ñ 1a LT

@c Lift2l c abs LT pEquivClass PIComEq cq

The combinators S, K and are required, the others may not be made visible directly.

HOL Constant

Sl : 1a LT

S l Lift2l S c

HOL Constant

Kl : 1a LT

K l Lift2l K c

HOL Constant

$l : 1a LT

$l Lift2l $c

SML

declare alias p"S", pS lqq;

declare alias p"K", pK lqq;

34

Page 35: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

4.4 Application and Abstraction

To reason about this we are going to need to show that choice of representative does not matter.

SML

declare infix p250 , "l"q;

HOL Constant

$l : 1a LT Ñ 1a LT Ñ 1a LT

@f a f l a Lift2l ppεx x P rep LT f q c pεx x P rep LT aqq

SML

declare aliasp".", p$lqq;

declare infix p250 , "."q;

5 Illative Lambda-Calculus

SML

open theory "icomb";

force new theory "ilamb";

force new pc "1ilamb";

merge pcs r"1savedthm cs D proof "s "1ilamb";

new parent "equiv";

set merge pcs r"icomb", "1ilamb"s;

I λx x

HOL Constant

$Il : 1a LT

I l pS l l K l q l K l

T λx y x

HOL Constant

$T l : 1a LT

T l K l

F λx y y

35

Page 36: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

HOL Constant

$F l : 1a LT

F l K l l I l

SML

declare alias p"I ", pI lqq;

declare alias p"T", pT lqq;

declare alias p"F", pF lqq;

T l thm $ rs |ùl T l

5.1 Primitive Equality

I expect that non-primitive equalities will be normally used, but these will be defined in terms of theprimitive equality.

SML

declare infix p210 , "n"q;

HOL Constant

$n : 1a LT Ñ 1a LT Ñ 1a LT

@x y x n y $l l x l y

SML

declare alias p"", p$nqq;

5.2 The System of Type Assignment

SML

set flag p"subgoal package quiet", falseq;

set flag p"pp use alias", trueq;

6 Postscript

After iterating over the abstract syntax for the infinitary system many times I have now managed tocome up with a first cut at the semantics. This was not particularly easy for me, and the result is abit of a mess, so even if it miraculously turns out actually to be correct, I will still in all probabilityhave to massage it for a while longer to get it in a better state for reasoning with.

The main requirement is something like a consistency proof, which in this context comes down toproving that true and false are not equivalent. I am not rushing into that.

It is now possible, even in default of this consistency result, to start moving forward on the illativelambda calculus by thinking about and defining the primitives, and it may be possible to get someresults in that theory (inconsistency, on the face of it, does not make it harder to get results!). So Iwill explore that a while before even starting on the consistency result, and then perhaps progressthe two in tandem.

36

Page 37: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

A Theory Listings

A.1 The Theory icomb

Parents

equiv misc3

Children

ilamb

37

Page 38: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

Constants

CrepClosed 1a GSU P Ñ BOOLCsyntax 1a GSU PCscPrec 1a RED$Cue

1a GSU Ñ p1a GSU Ñ 1bq Ñ 1a GSU Ñ 1bCscRank 1a GSU Ñ 1a GSUCscSeq 1a GSU Ñ BOOL$c p1a GSU , 1a GSU q BRMkCcon 1a GSU Ñ 1a GSUSc

1a GSUKc

1a GSU$c

1a GSUIc

1a GSUT c

1a GSUF c

1a GSUIfc p1a GSU , 1a GSU Ñ 1a GSU q BR0c

1a GSUSucc

1a GSUΦc

1a GSU Ñ 1a GSUΩc

1a GSUΨc

1a GSUKred 1a REDSred 1a REDΩred

1a REDΨred

1a REDDComRed 1a REDDiComRed 1a REDDbComRed 1a REDNp 1a RED Ñ 1a REDIneq0 1a REDEqSeq 1a RED Ñ 1a REDIneqStep 1a RED Ñ 1a REDEqStep 1a RED Ñ 1a REDred

1a RED Ñ 1a REDRedClosed1 1a RED Ñ BOOLRedClosed2 1a RED Ñ BOOLRedClosure 1a RED Ñ 1a REDILamFunct 1a RED Ñ 1a REDILamFunctS 1a GSU Ø 1a GSU Ñ 1a GSU Ø 1a GSUPIComEq 1a GSU P 1a REDPureInfComb 1a GSU P Ñ BOOLChurchRosser p1a, BOOLq BR Ñ BOOLSubTerm 1a GSU LIST Ñ 1a GSU Ñ 1a GSUis SubTerm 1a GSU LIST Ñ 1a GSU Ñ BOOLis redex set 1a RED Ñ 1a GSU Ñ 1a GSU LIST P Ñ BOOLcls restrict 1a GSU LIST P Ñ 1a GSU Ñ 1a GSU LIST Preduce 1a RED Ñ 1a GSU Ñ 1a GSUdepth map aux

p1a GSU Ñ 1a GSU q Ñ 1a GSU Ñ 1a GSU LIST P Ñ 1a GSUdepth map p1a GSU Ñ 1a GSU q Ñ 1a GSU LIST P Ñ 1a GSU Ñ 1a GSUpar reduce 1a RED Ñ 1a GSU LIST P Ñ 1a GSU Ñ 1a GSU

38

Page 39: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

disj par reduce1a RED Ñ 1a RED

subs p1a GSU , 1a GSU Ñ 1a GSU q BRinert 1a RED Ñ 1a GSU Ñ BOOLcomm subs 1a RED Ñ BOOLis cmap 1a GSU Ñ BOOLK cmap 1a GSU Ñ 1a GSUK rmap p1a GSU , 1a GSU q BRrep LT 1a LT Ñ 1a GSU Pabs LT 1a GSU P Ñ 1a LT$|ùl

1a LT LIST Ñ 1a LT Ñ BOOLLift2l 1a GSU Ñ 1a LTSl

1a LTKl

1a LT$l

1a LT$l p1a LT , 1a LT q BR

Aliases

|ù $|ùl : 1a LT LIST Ñ 1a LT Ñ BOOLS S l : 1a LTK K l : 1a LT. $l : p1a LT , 1a LT q BR

Types

11 LT

Type Abbreviations

1a RED 1a RED1a CT 1a CT1a CC 1a CC

Fixity

Right Infix 0 : |ù |ùl

Right Infix 250 :. l

Right Infix 310 :Cue

Right Infix 350 :

c

39

Page 40: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

Definitions

CrepClosed $ @ s CrepClosed s

ô p@ c i Funu i

^ Ordinalu pDomu iq^ X u pRanu iq s

ñ c ÞÑu i P sqCsyntax $ Csyntax

tx |CrepClosed xu

CscPrec $ @ α γ CscPrec α γ ô pD c i α Pu Ranu i ^ γ c ÞÑu iq

Cue $ @ s f s Cue f

pλ t if t Pu s then f t else ε x T q

CscRank $ @ c i CscRank pc ÞÑu iq

u

pImagepu

SucupImagepu pi Cue CscRankq pRanu iqqq

CscSeq $ @ s CscSeq s

ô Sequ s ^ p@ t t Pu Ranu s ñ t P Csyntax q

c $ @ f a f c a

plet fc Fstu f and fa Sndu fin fc ÞÑu fa @u Unitu pHu ÞÑu aqq

MkCcon $ @ n MkCcon n n ÞÑu Hu

Sc $ S c MkCcon pNatu 0 qKc $ K c MkCcon pNatu 1 qc $ $c MkCcon pNatu 2 qIc $ I c pS c c K cq c K c

T c $ T c K c

F c $ F c K c c I c

Ifc $ @ x y z If c x y z px c yq c z0c $ 0 c I c

Succ $ Succ S c c S c c pK c c S cq c K c

Φc $ @ s Φc s Natu 3 ÞÑu sΩc $ Ωc MkCcon pNatu 4 qΨc $ Ψ c MkCcon pNatu 5 qKred $ @ s t

Kred s t ô pD x y s pK c c x q c y ^ t x qSred $ @ s t

Sred s tô pD x y z s ppS c c x q c yq c z

^ t px c z q c y c z qΩred $ @ s t

Ω r ed s tô pD k l m n Domu k Domu m

40

Page 41: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

^ Ordinalu pDomu kq^ Ranu k Unitu F c

^ s Ωc c Φc pk @u lq c Φc pm @u nq^ t Ωc c Φc l c Φc nq

_ pD k m Hu ÞÑu T c Pu k

^ Hu ÞÑu t Pu m^ s Ωc c Φc k c Φc mq

Ψred $ @ s t Ψ r ed s t

ô pD f l m Domu l Domu m

^ Ordinalu pDomu lq^ m pλu x f c x q pDomu lq^ s pΨ c c f q c Φc l^ t Φc mq

DComRed $ @ s t DComRed s t ô Kred s t _ Sred s tDiComRed $ @ s t DiComRed s t ô Ω r ed s t _ Ψ r ed s tDbComRed $ @ s t

DbComRed s tô Kred s t _ Sred s t _ Ω r ed s t _ Ψ r ed s t

Np $ @ r Np r pλ x y r pp$c c x q c yq F cqIneq0 $ Ineq0

pλ x y D v w x MkCcon v ^ y MkCcon w ^ v wq

EqSeq $ @ eq EqSeq eq

pλ v w Funu v

^ Funu w^ Domu v Domu w^ Ordinalu pDomu vq^ p@ x x Pu Domu v ñ eq pv u x q pw u x qqq

IneqStep $ @ eq IneqStep eq

pλ x y Ineq0 x y

_ Np eq x y_ pD v w EqSeq eq v w ^ Np eq px c vq py c wqqq

EqStep $ @ eq EqStep eq

pλ v w D c i1 i2 c ÞÑu i1 P Csyntax

^ c ÞÑu i2 P Csyntax^ Domu i1 Domu i2^ p@ x x Pu Domu i1 ñ eq pi1 c x q pi2 c x qqq

red $ @ eq

41

Page 42: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

r ed eq pλ x y D l m x p$c c lq c m

^ pEqStep eq x y ^ y T c

_ IneqStep eq x y ^ y F cqqRedClosed1 $ @ r

RedClosed1 rô p@ c i1 i2 c ÞÑu i1 P Csyntax

^ c ÞÑu i2 P Csyntax^ Domu i1 Domu i2^ p@ x x Pu Domu i1 ñ r pi1 c x q pi2 c x qq

ñ r pc ÞÑu i1 q pc ÞÑu i2 qqRedClosed2 $ @ r

RedClosed2 rô p@ c d e f g h c ÞÑu e P Csyntax

^ d ÞÑu f P Csyntax^ r pc ÞÑu eq pd ÞÑu f q^ EqSeq r g h

ñ r pc ÞÑu e @u gq pc ÞÑu f @u hqqRedClosure $ @ r

RedClosure r SndpEquivClosure

pCsyntax ,pλ x y @ r1 RedClosed1 r1

^ RedClosed2 r1^ pCsyntax , rq pCsyntax , r1 q

ñ r1 x yqqqILamFunct $ @ r ILamFunct r RedClosure pr ed rqILamFunctS $ @ s

ILamFunctS s tx|ILamFunct pλ x y px , yq P sq pFst x q pSnd x qu

PIComEq $ PIComEq EquivClosurepCsyntax , pλ x y px , yq P Lfp ILamFunctS qq

PureInfComb $ @ x PureInfComb x ô x P Csyntax Snd PIComEqChurchRosser $ @ r

ChurchRosser rô p@ w x y r w x ^ r w y ñ pD z r x z ^ r y z qq

SubTerm $ @ h t tl SubTerm rs t t

^ SubTerm pCons h tlq t SubTerm tl pSndu t u hq

42

Page 43: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

is SubTerm $ @ h t tl pis SubTerm rs t ô T q

^ pis SubTerm pCons h tlq tô h Pu Domu pSndu tq^ is SubTerm tl pSndu t u hqq

is redex set $ @ r t cls is redex set r t cls

ô p@ cs cs P cls

ñ is SubTerm cs t^ pD y r pSubTerm cs tq yqq

cls restrict $ @ cls t cls restrict cls t tv |Cons t v P clsureduce $ @ r t

reduce r t pε nt r t nt _ pD nt2 r t nt2 q ^ nt tq

depth map aux$ @ f c ts depth map aux f pc ÞÑu tsq

pλ cls plet newts

Imagepu

pλ op Fstu op

ÞÑu pts Cue depth map aux f qpSndu opqpcls restrict cls pFstu opqqq

tsin if rs P clsthen f pc ÞÑu newtsqelse c ÞÑu newtsqq

depth map $ @ f cls t depth map f cls t depth map aux f t clspar reduce $ @ r c ts cls

par reduce r cls pc ÞÑu tsq depth map preduce rq cls pc ÞÑu tsq

disj par reduce$ @ r c ts nt disj par reduce r pc ÞÑu tsq nt

ô r pc ÞÑu tsq nt_ pD ts 1

p@ i v i ÞÑu v Pu ts

ô pD v 1

i ÞÑu v 1 Pu ts 1

^ ppts Cue disj par reduce rqvv 1

_ v 1 vqqq^ pD i v v 1

i ÞÑu v Pu ts^ i ÞÑu v 1 Pu ts 1

^ pts Cue disj par reduce rq v v 1q

43

Page 44: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

^ nt c ÞÑu ts 1qsubs $ @ cn c ts s

subs cn s pc ÞÑu tsq pif c cn

thenFstu sÞÑu Sndu s

@u RanMapu pts Cue subs cn sq tselse c ÞÑu RanMapu pts Cue subs cn sq tsq

inert $ @ r c inert r c

ô pD ts c1 ts 1

r pc ÞÑu tsq pc1 ÞÑu ts 1q ^ c c1qcomm subs $ @ r

comm subs rô p@ cn inert r cn

ñ p@ s t t2 s P Csyntax ^ t P Csyntax

ñ r t t2ñ r psubs cn s tq psubs cn s t2 qqq

is cmap $ @ m is cmap m

ô Funu m^ p@ x x Pu Domu m

ñ Sequ x^ p@ y y Pu Ranu x ñ Ordinalu yqq

^ p@ x y y Pu Domu m ^ Domu x u Domu y

ñ x Pu Domu mq^ p@ x y y Pu Domu m

^ Domu x Domu y^ p@ z z Pu Domu x ñ x u z u y u z q

ñ x Pu Domu mqK cmap $ @ m

K cmap m pλu cs plet h Headu cs

and x m u Unitu pHu ÞÑu Huqin m

u pif Natu 2 ¤u hthen

let h2 pif natural numberu h

then h u Natu 1else hq

in SeqConsu h2 pTailu csqelse if h Natu 1

44

Page 45: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

then Tailu cselse csqqq

pGxu mqK rmap $ @ m

K rmap m pλ cs plet h Headu cs

and x m u Unitu pHu ÞÑu Huqin if Natu 2 ¤u hthen

let h2 pif natural numberu h

then h u Natu 1else hq in SeqConsu h2 pTailu csq

else if h Natu 1then Tailu cselse csqq

LT $ D f TypeDefn PureInfComb fabs LTrep LT $ p@ a abs LT prep LT aq aq

^ p@ r PureInfComb r ô rep LT pabs LT rq rq^ OneOne rep LT

|ùl $ @ pl p ppl |ù pq

ô @L pMap pλ p T c P rep LT pq plqñ T c P rep LT p

Lift2l $ @ c Lift2l c abs LT pEquivClass PIComEq cqSl $ S Lift2l S c

Kl $ K Lift2l K c

l $ $l Lift2l $c

l $ @ f a f . a

Lift2lppε x x P rep LT f q c pε x x P rep LT aqq

Theorems

crepclosed csyntax thm$ @ c i Funu i

^ Ordinalu pDomu iq^ p@ x x P X u pRanu iq ñ x P Csyntax q

ñ c ÞÑu i P Csyntaxcrepclosed csyntax thm2

$ @ c i Funu i

^ Ordinalu pDomu iq^ p@ x x Pu Ranu i ñ x P Csyntax q

ñ c ÞÑu i P Csyntaxcrepclosed csyntax thm3

$ @ c i Sequ i ^ p@ x x Pu Ranu i ñ x P Csyntax q

45

Page 46: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

ñ c ÞÑu i P Csyntaxcrepclosed csyntax lemma1

$ @ s CrepClosed s ñ Csyntax screpclosed csyntax lemma2

$ @ p CrepClosed tx |p xu ñ p@ x x P Csyntax ñ p x qwell founded CscPrec thm

$ well founded CscPrecwell founded tcCscPrec thm

$ well founded ptc CscPrecqcsc fc thm $ @ x

x P Csyntaxñ pD c i Funu i

^ Ordinalu pDomu iq^ p@ y y Pu Ranu i ñ y P Csyntax q^ x c ÞÑu iq

Hu P csyntax lemma$ Hu P Csyntax

Hu P csyntax lemma2$ @ x x P Csyntax ñ x Hu

Hu P csyntax lemma3$ @ V x x P V ^ V Csyntax ñ x Hu

csc fc thm2 $ @ c i c ÞÑu i P Csyntax

ñ Funu i^ Ordinalu pDomu iq^ p@ x x Pu Ranu i ñ x P Csyntax q

cscprec fc thm$ @ c i x x Pu Ranu i ñ CscPrec x pc ÞÑu iq

csyn induction thm$ p@ c i

Funu i^ Ordinalu pDomu iq^ p@ x x Pu Ranu i ñ x P Csyntax ^ p x q

ñ p pc ÞÑu iqqñ p@ x x P Csyntax ñ p x q

csyn induction thm2$ p@ c i

Sequ i^ p@ x x Pu Ranu i ñ x P Csyntax ^ p x q

ñ p pc ÞÑu iqqñ p@ x x P Csyntax ñ p x q

csyntax pair thm$ @ t t P Csyntax ñ pD c ts t c ÞÑu tsq

csc recursion lemma$ @ af D f @ c i f pc ÞÑu iq af pi Cue f q c i

MkCcon P Csyntax thm$ @ x MkCcon x P Csyntax

Equiv PIComEq thm$ Equiv PIComEq

CSyntax PIComEq thm

46

Page 47: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

$ @ x x P Csyntax ñ x P EquivClass PIComEq xCrTc thm $ @ r ChurchRosser r ñ ChurchRosser ptc rqSubTerm in Csyntax lemma

$ @ t t P Csyntax

ñ p@ cs is SubTerm cs t ñ SubTerm cs t P Csyntax q

r disj par thm$ @ r x y x P Csyntax ^ r x y ñ disj par reduce r x y

inert disj par thm$ @ r cn inert pdisj par reduce rq cn ô inert r cn

LT fc thm1 $ @ r PureInfComb r ñ rep LT pabs LT rq rLT fc thm2 $ @ x y

PureInfComb x ^ PureInfComb yñ pabs LT x abs LT y ô x yq

Lift2l thm $ @ x x P Csyntax ñ x P rep LT pLift2l x q

47

Page 48: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

A.2 The Theory ilamb

Parents

equiv icomb

Constants

Il1a LT

T l1a LT

F l1a LT

$n p1a LT , 1a LT q BR

Aliases

I I l : 1a LTT T l : 1a LTF F l : 1a LT $n : p1a LT , 1a LT q BR

Fixity

Right Infix 210 :n

Definitions

Il $ I pS . K q . KT l $ T KF l $ F K . In $ @ x y x y $l . x . y

Theorems

T l thm $ rs |ù T

48

Page 49: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

Bibliography

[1] H.P. Barendregt. The Lambda-Calculus - Its Syntax and Semantics. North Holland, 2 edition.1984.

[2] Alonzo Church. The calculi of Lambda-conversion. Princeton University Press. 1941.

[3] Roger Bishop Jones. PolySets. 2007.http://www.rbjones.com/rbjpub/www/papers/p011.pdf.

[4] Roger Bishop Jones. A Higher Order Theory of Well-Founded Sets (with Urelements).RBJones.com, 2010. http://www.rbjones.com/rbjpub/pp/doc/t042.pdf.

[5] Roger Bishop Jones. Infinitarily Definable Non-Well-Founded Sets. RBJones.com, 2010.http://www.rbjones.com/rbjpub/pp/doc/t024.pdf.

[6] Roger Bishop Jones. Infinitarily Definable Sets. RBJones.com, 2010.http://www.rbjones.com/rbjpub/pp/doc/t026.pdf.

[7] Roger Bishop Jones. Infinitary First Order Set Theory. RBJones.com, 2010.http://www.rbjones.com/rbjpub/pp/doc/t027.pdf.

[8] Roger Bishop Jones. Introduction to Work in Progress. RBJones.com, 2010.http://www.rbjones.com/rbjpub/pp/doc/t000.pdf.

[9] Roger Bishop Jones. PolySet Theory. RBJones.com, 2010.http://www.rbjones.com/rbjpub/pp/doc/t020.pdf.

[10] Roger Bishop Jones. Set Theory as Consistent Infinitary Comprehension. RBJones.com, 2010.http://www.rbjones.com/rbjpub/pp/doc/t021.pdf.

49

Page 50: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

Index

1icomb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61ilamb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Ωc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14, 38, 40Ωred . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 38, 40Φc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14, 38, 40Ψc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15, 38, 40Ψred . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 38, 41Cue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 38–40 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 38, 40 l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34, 39, 45 n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 48 red . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 38, 41D PureInfComb lemma . . . . . . . . . . . . . . . . . . . . . 22 Hu P csyntax lemma . . . . . . . . . . . . . . . . . . 9, 46 Hu P csyntax lemma2 . . . . . . . . . . . . . . . . . 9, 46 Hu P csyntax lemma3 . . . . . . . . . . . . . . . . . 9, 46|ù . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39|ù l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34, 39, 45

c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11, 38–40

l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35, 39, 450c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13, 38, 40

abs LT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 39, 45

CC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39ChurchRosser . . . . . . . . . . . . . . . . . . . . . . . . 22, 38, 42cls restrict . . . . . . . . . . . . . . . . . . . . . . . . . . . 24, 38, 43combinator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

pure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16comm subs . . . . . . . . . . . . . . . . . . . . . . . . . . . 28, 39, 44CrepClosed . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7, 38, 40crepclosed csyntax lemma . . . . . . . . . . . . . . . . . . . . 7crepclosed csyntax lemma1 . . . . . . . . . . . . . . . . 8, 46crepclosed csyntax lemma2 . . . . . . . . . . . . . . . . 8, 46crepclosed csyntax thm . . . . . . . . . . . . . . . . . . . . 7, 45crepclosed csyntax thm2 . . . . . . . . . . . . . . . . . . . 7, 45crepclosed csyntax thm3 . . . . . . . . . . . . . . . . . . . 7, 45CrTc thm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22, 47csc fc thm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8, 46csc fc thm2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9, 46CSC INDUCTION T . . . . . . . . . . . . . . . . . . . . . . . 8csc induction tac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8csc recursion lemma . . . . . . . . . . . . . . . . . . . . . 11, 46CscPrec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8, 38, 40cscprec fc thm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9, 46CscPrec tc P thm . . . . . . . . . . . . . . . . . . . . . . . . . . . 8CscRank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11, 38, 40CscSeq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11, 38, 40csyn induction thm . . . . . . . . . . . . . . . . . . . . . . . 9, 46csyn induction thm2 . . . . . . . . . . . . . . . . . . . . . 10, 46Csyntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7, 38, 40csyntax pair thm . . . . . . . . . . . . . . . . . . . . . . . . 10, 46CSyntax PIComEq thm . . . . . . . . . . . . . . . . . 21, 46CT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

DbComRed . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 38, 41DComRed . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 38, 41depth map . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25, 38, 43depth map aux . . . . . . . . . . . . . . . . . . . . . . . . 25, 38, 43DiComRed . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 38, 41disj par reduce . . . . . . . . . . . . . . . . . . . . . . . 27, 39, 43

EqSeq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19, 38, 41EqStep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 38, 41Equiv PIComEq thm . . . . . . . . . . . . . . . . . . . . 21, 46

F . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Fst PIComEq thm . . . . . . . . . . . . . . . . . . . . . . . . . 21F c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13, 38, 40F l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 48

GSU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48icomb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6icomb induction tac . . . . . . . . . . . . . . . . . . . . . . . . . . 9icomb induction tac2 . . . . . . . . . . . . . . . . . . . . . . . . 10If c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13, 38, 40ilamb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35ILamFunct . . . . . . . . . . . . . . . . . . . . . . . . . . . 21, 38, 42ILamFunctS . . . . . . . . . . . . . . . . . . . . . . . . . 21, 38, 42Ineq0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19, 38, 41IneqStep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 38, 41inert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27, 39, 44inert disj par thm . . . . . . . . . . . . . . . . . . . . . . 28, 47is cmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30, 39, 44is redex set . . . . . . . . . . . . . . . . . . . . . . . . . . 24, 38, 43is SubTerm . . . . . . . . . . . . . . . . . . . . . . . . . . . 23, 38, 43Ic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 38, 40I l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35, 48

K . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39K cmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32, 39, 44K rmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32, 39, 45Kred . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 38, 40Kc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 38, 40Kl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34, 39, 45

Lift2l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34, 39, 45Lift2l thm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47LT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 45LT clauses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33LT def . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33LT fc thm1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 47LT fc thm2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 47

MkCcon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 38, 40MkCcon P Csyntax thm . . . . . . . . . . . . . . . 12, 46MkCcons P Csyntax clauses . . . . . . . . . . . . . . . . 15

Np . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19, 38, 41

50

Page 51: An Illative Lambda-Calculus - rbjones.comAn Illative Lambda-Calculus Roger Bishop Jones Abstract This is an approach to illative lambda-calculi via construction of an in nitary calculus

par reduce . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25, 38, 43PIComEq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21, 38, 42PureInfComb . . . . . . . . . . . . . . . . . . . . . . . . 22, 38, 42PureInfComb D lemma . . . . . . . . . . . . . . . . . . . . . 22

r disj par thm . . . . . . . . . . . . . . . . . . . . . . . . . . 27, 47RED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 39RedClosed1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 38, 42RedClosed2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 21, 38, 42RedClosure . . . . . . . . . . . . . . . . . . . . . . . . . . . 21, 38, 42reduce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25, 38, 43rep LT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 39, 45

S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Sred . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 38, 40subs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27, 39, 44SubTerm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23, 38, 42SubTerm in Csyntax lemma . . . . . . . . . . . . . 24, 47Succ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13, 38, 40Sc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 38, 40Sl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34, 39, 45

T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48T c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13, 38, 40T l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35, 48T l thm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 48

well founded CscPrec thm . . . . . . . . . . . . . . . 8, 46well founded tcCscPrec thm . . . . . . . . . . . . . . 8, 46

51