Nominal Sets. c 2011 Andrew M. Pitts

Similar documents
3. Mathematical Induction

Program equivalence in functional metaprogramming via nominal Scott domains

Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic

Cartesian Products and Relations

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

Introduction to Topology

FUNCTIONAL ANALYSIS LECTURE NOTES: QUOTIENT SPACES

9. Quotient Groups Given a group G and a subgroup H, under what circumstances can we find a homomorphism φ: G G ', such that H is the kernel of φ?

INTRODUCTORY SET THEORY

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.

NOTES ON CATEGORIES AND FUNCTORS

INCIDENCE-BETWEENNESS GEOMETRY

Finite dimensional topological vector spaces

Group Theory. Contents

Basic Concepts of Point Set Topology Notes for OU course Math 4853 Spring 2011

GROUPS ACTING ON A SET

Linear Algebra. A vector space (over R) is an ordered quadruple. such that V is a set; 0 V ; and the following eight axioms hold:

Lecture 16 : Relations and Functions DRAFT

FIBRATION SEQUENCES AND PULLBACK SQUARES. Contents. 2. Connectivity and fiber sequences. 3

MA651 Topology. Lecture 6. Separation Axioms.

CHAPTER 7 GENERAL PROOF SYSTEMS

ACTA UNIVERSITATIS APULENSIS No 15/2008 PRODUCTS OF MULTIALGEBRAS AND THEIR FUNDAMENTAL ALGEBRAS. Cosmin Pelea

Math 4310 Handout - Quotient Vector Spaces

Lecture 17 : Equivalence and Order Relations DRAFT

Lemma 5.2. Let S be a set. (1) Let f and g be two permutations of S. Then the composition of f and g is a permutation of S.

6.2 Permutations continued

FIBER PRODUCTS AND ZARISKI SHEAVES

Chapter 7. Permutation Groups

So let us begin our quest to find the holy grail of real analysis.

Non-deterministic Semantics and the Undecidability of Boolean BI

SMALL SKEW FIELDS CÉDRIC MILLIET

Math 223 Abstract Algebra Lecture Notes

Notes on Richard Dedekind s Was sind und was sollen die Zahlen?

Mathematics Course 111: Algebra I Part IV: Vector Spaces

Introduction to Modern Algebra

CS 103X: Discrete Structures Homework Assignment 3 Solutions

A Beginner s Guide to Modern Set Theory

5. Linear algebra I: dimension

A CONSTRUCTION OF THE UNIVERSAL COVER AS A FIBER BUNDLE

Set theory as a foundation for mathematics

Handout #1: Mathematical Reasoning

Mathematical Induction

Lecture Notes on Topology for MAT3500/4500 following J. R. Munkres textbook. John Rognes

3. Prime and maximal ideals Definitions and Examples.

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES

MATH10040 Chapter 2: Prime and relatively prime numbers

SOME PROPERTIES OF FIBER PRODUCT PRESERVING BUNDLE FUNCTORS

1 if 1 x 0 1 if 0 x 1

A Little Set Theory (Never Hurt Anybody)

CODING TRUE ARITHMETIC IN THE MEDVEDEV AND MUCHNIK DEGREES

Metric Spaces Joseph Muscat 2003 (Last revised May 2009)

CONSEQUENCES OF THE SYLOW THEOREMS

This chapter is all about cardinality of sets. At first this looks like a

DEGREES OF ORDERS ON TORSION-FREE ABELIAN GROUPS

THE DIMENSION OF A VECTOR SPACE

Continued Fractions and the Euclidean Algorithm

Mathematical Induction

Quotient Rings and Field Extensions

8 Divisibility and prime numbers

Sets of Fibre Homotopy Classes and Twisted Order Parameter Spaces

Basic Proof Techniques

Degrees that are not degrees of categoricity

G = G 0 > G 1 > > G k = {e}

Matrix Representations of Linear Transformations and Changes of Coordinates

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

How To Know If A Domain Is Unique In An Octempo (Euclidean) Or Not (Ecl)

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

arxiv: v1 [math.ct] 20 Jun 2010

CHAPTER 1 BASIC TOPOLOGY

TOPOLOGY: THE JOURNEY INTO SEPARATION AXIOMS

Online publication date: 11 March 2010 PLEASE SCROLL DOWN FOR ARTICLE

Turing Degrees and Definability of the Jump. Theodore A. Slaman. University of California, Berkeley. CJuly, 2005

Notes on Determinant

Representing Reversible Cellular Automata with Reversible Block Cellular Automata

Testing LTL Formula Translation into Büchi Automata

No: Bilkent University. Monotonic Extension. Farhad Husseinov. Discussion Papers. Department of Economics

Galois Theory III Splitting fields.

Algebraic Geometry. Keerthi Madapusi

o-minimality and Uniformity in n 1 Graphs

Linear Algebra I. Ronald van Luijk, 2012

RIGIDITY OF HOLOMORPHIC MAPS BETWEEN FIBER SPACES

The Ideal Class Group

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH. 1. Introduction

GROUP ALGEBRAS. ANDREI YAFAEV

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

NOTES ON LINEAR TRANSFORMATIONS

Basic Concepts of Set Theory, Functions and Relations

1. Prove that the empty set is a subset of every set.

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

4.5 Linear Dependence and Linear Independence

GENERATING SETS KEITH CONRAD

Likewise, we have contradictions: formulas that can only be false, e.g. (p p).

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

How To Prove The Cellosauric Cardinal Compactness (For A Cardinal Cardinal Compact)

facultad de informática universidad politécnica de madrid

CONTENTS 1. Peter Kahn. Spring 2007

INTRODUCTION TO TOPOLOGY

Transcription:

Nominal Sets c 2011 Andrew M. Pitts

Contents Preface page v 1 Permutations 1 1.1 The category of G-sets 1 1.2 Products and coproducts 3 1.3 Natural numbers 5 1.4 Functions 5 1.5 Power sets 6 1.6 Partial functions 10 1.7 Quotient sets 11 1.8 Finitary permutations 11 Exercises 13 2 Support 15 2.1 The category of nominal sets 15 2.2 Products and coproducts 18 2.3 Natural numbers 20 2.4 Functions 20 2.5 Power sets 22 2.6 Failure of choice 25 2.7 Partial functions 26 2.8 Quotient sets 27 2.9 α-equivalence 27 Exercises 28 3 Freshness 30 3.1 Freshness relation 30 3.2 Freshness quantifier 32 3.3 Local fresh atomic names 34 3.4 Separated product 35

iv Contents Exercises 37 4 Name Abstraction 38 4.1 Nominal set of name abstractions 38 4.2 Concretion 41 4.3 Functoriality 42 4.4 Freshness condition for binders 46 Exercises 48 5 Nominal Algebraic Data Types 50 5.1 Signatures 50 5.2 α-equivalence 53 5.3 Algebraic functors 56 5.4 Initial algebra semantics 59 5.5 Primitive recursion 63 5.6 Induction 68 Exercises 72 Bibliography 75 Notation index 77 General index 78

Preface Names and constructs that bind names are ubiquitous in programming languages. Nominal sets provide a mathematical theory of structures involving names that was introduced by the author and Jamie Gabbay about 10 years ago. The theory is based on some simple, but subtle ideas to do with permutations of names and the notion of finitely supported mathematical structures which first arose in mathematical logic in the 1930s. The theory has turned out to have some interesting logical and computational properties, with applications to programming language semantics, machine-assisted theorem proving and the design of functional and logical metaprogramming languages. These notes on the underlying theory of nominal sets accompany a four-lecture course on Nominal Sets and Their Applications given at the Midland Graduate School 2011. The material forms part of a book on Nominal Sets that is currently in preparation. I would be very grateful if readers would notify me of any errors they detect, or of any suggestions they have for improving the presentation. Andrew Pitts Andrew.Pitts@cl.cam.ac.uk University of Cambridge April 2011

1 Permutations The characteristic feature of the nominal sets approach to the syntax and semantics of formal languages is the use of permutations of names. As such, it is part of an important theme in mathematics with a well-developed body of work, the study of symmetry and the theory of groups. We need only a small amount of that theory, which we review in this chapter. 1.1 The category of G-sets A group is a set G equipped with an element e G (the group unit), a function (g, g ) G G g g G (the group multiplication operation) and a function g G g 1 G (the group inverse operation). This structure is required to satisfy (g g ) g = g (g g ) (1.1) e g = g = g e (1.2) g 1 g = e = g g 1 (1.3) for all g, g, g G. A homomorphism of groups is a function θ : G G satisfying θ e = e (1.4) θ(g g ) = (θ g)(θ g ) (1.5) θ(g 1 ) = (θ g) 1 (1.6) for all g, g G. A subgroup of a group G is a subset G G that contains e and is closed under the group multiplication and inverse operations. Notation In this book we specify functions using a variety of informal notations. If an expression e(x) denotes an element of a set Y as x ranges over the elements of set X, then the function X Y it determines will be denoted by either of the

2 Permutations notations x X e(x) Y λx X e(x). (1.7) When the set X has some structure, we use notations for patterns; for example if X = X 1 X 2 is a cartesian product, we write λ(x 1, x 2 ) X 1 X 2 e(x 1, x 2 ). Example 1.1 If A is a set, then a permutation of A is a bijection π from A to itself. The composition π π of two functions that are permutations is another such, as is the inverse function π 1 of a permutation; and the identity function id on A is a permutation. Therefore, taking the group multiplication to be function composition, the permutations of A form a group, called the symmetric group on the set A and denoted S A. It is classic result of group theory (Cayley s Theorem, a special case of the Yoneda Lemma in category theory) that every group is a subgroup of a symmetric group. An action of a group G on a set X is a function G X X assigning to each (g, x) G X an element g x of X satisfying g (g x) = (g g ) x (1.8) e x = x (1.9) for all g, g G and x X. This is equivalent to specifying a homomorphism of groups G S X (see Exercise 1.1). Definition 1.2 If G is a group, then a G-set is a set X equipped with an action of G on X. We will usually refer to a G-set by naming its underlying set X, using the same notation for all group actions, whatever the set X. G-sets are the objects of a category [G, Set] whose morphism from X to X are equivariant functions, that is, functions F : X Y satisfying F(g x) = g (F x) (1.10) for all g G and x X. Composition and identities in the category are the same as in the category Set of sets and functions. Example 1.3 If G is any subgroup of the symmetric group S A, we get a G-set with underlying set A by taking the G-action to be given by function application: π a = π a. Example 1.4 Let Σ be a (single-sorted) algebraic signature. Thus Σ = (Σ n n N) is a countably infinite family of sets. The elements of each set Σ n are the n-ary operations of the signature. The set Σ[X] of algebraic terms over Σ with variables

1.2 Products and coproducts 3 drawn from some set X is inductively defined by the following rules. x X x Σ[X] t 1 Σ[X] t n Σ[X] op Σ n op(t 1,, t n ) Σ[X] There is an action of S X on Σ[X] given by applying a finite permutation to variables where they occur in algebraic terms: π x = π x π op(t 1,, t n ) = op(π t 1,, π t n ). (1.11) 1.2 Products and coproducts Given a group G and G-sets X 1,..., X n, we make the cartesian product X 1 X n {(x 1,..., x n ) x 1 X 1 x n X n } (1.12) into a G-set by defining the group action coordinate-wise: g (x 1,..., x n ) (g x 1,..., g x n ). (1.13) In case n = 0, the cartesian product is just a singleton set 1 = {()} and the action is g () = (). Definition (1.13) ensures that the projection functions from a product of G-sets to one of its components proj i : X 1 X n X i proj i λ(x 1,..., x n ) X 1 X n x i (1.14) are all equivariant and hence give morphisms in [G, Set]. Indeed they make X 1 X n into the categorical product of the objects X i in [G, Set]. For if (F i : X X i i = 1..n) are some equivariant functions, then the unique function F 1,..., F n : X X 1 X n satisfying proj i F 1,..., F n = F i (for i = 1..n) is easily seen to be equivariant. Example 1.5 Given any set X, the second projection function λ(g, x) G I x is trivially a G-action. We call X equipped with this action the discrete G-set on X. If F : X Y is an equivariant function whose domain X is a discrete G-set, then for each x X, F x = F(g x) = g (F x). Thus F maps X into the subset Γ Y {y Y ( g G) g y = y}. (1.15) (See Exercise 1.2.) The terminal object 1 is a discrete G-set and the global sections 1 X of any G-set X correspond to elements of Γ X. Note that Γ X may be empty even if X as a set is non-empty. For example, when G = S A is the symmetric group on a set A, the S A-set A from Example 1.3 satisfies Γ A = so long as A has at least two elements. In this case proj 1, proj 2 : A A A are different morphisms

4 Permutations in [S A, Set] that have equal compositions with every 1 A (since there are no such global sections). Thus [S A, Set] is not a well-pointed category. (In general a category with a terminal object is well-pointed if any two morphisms with equal domain and codomain are equal if their compositions with any global section are equal.) Example 1.6 action: The group G is itself a G-set once we endow it with the conjugation g g g g g 1. (1.16) This is not the only possible action of G on itself, unless G = {e} is trivial; see Exercise 1.3. However it has the distinction of making the action function F λ(g, x) G X g x for any G-set X into an equivariant function F : G X X. For we have F(g g, g x) = (g g g 1 ) (g x) = (g g g 1 g) x = (g g ) x = g F(g, x). We make the disjoint union X 1 + + X n {(i, x) i {1,..., n} x X i } (1.17) into a G-set by defining the group action as follows: g (i, x) (i, g x). (1.18) It is easy to see that definitions (1.13) and (1.18) inherit the required properties (1.8) and (1.9) from the actions for each X i. Definition (1.18) ensures that the functions injecting a G-set into a disjoint union of G-sets inj i : X i X 1 + + X n inj i λx X i (i, x) (1.19) are morphisms in [G, Set] and make X 1 + + X n into the coproduct of the objects X i in [G, Set]. These properties of cartesian product and disjoint union extend from the finite to the infinite case. Thus if (X i i I) is a family of G-sets indexed by the elements of a set I, then the cartesian product i I X i {(x i i I) ( i I) x i X i } (1.20) equipped with the G-action g (x i i I) = (g x i i I) is the product of the objects X i in [G, Set]. Similarly, the disjoint union i I X i {(i, x) i I x i X i } (1.21) equipped with the G-action g (i, x) = (i, g x) is their coproduct in [G, Set].

1.3 Natural numbers 5 1.3 Natural numbers The coproduct i I X i in the case I = N = {0, 1, 2,... } and each X i is the terminal 1, is necessarily a natural number object in [G, Set]. In other words it is a G-set N equipped with equivariant functions 1 zero N suc N (1.22) with the universal property that for any other such diagram in [G, Set] 1 X 0 X F X (1.23) there is a unique equivariant function iter X 0 F making 1 zero N suc N (1.24) 1 iter X 0 F X 0 X F X iter X 0 F commute. Note that i I X i is discrete (Example 1.5) when all the X i are discrete G-sets.In particular we can identify N with the discrete G-set on the set N of natural numbers equipped with the usual zero and successor functions: zero() = 0, suc n = n + 1. Given (1.23), the unique function iter X 0 F : N X making (1.24) commute is recursively defined by iter X 0 F 0 = X 0 () iter X 0 F (n + 1) = F (iter X 0 F n). It is equivariant because N is discrete and X 0 and F are equivariant. Theorem 1.7 1.4 Functions For any group G, the category [G, Set] is cartesian closed. Proof This theorem can be deduced from the more general fact that categories of Set-valued functors are cartesian closed (see Johnstone, 2002, Proposition 1.5.5, for instance); this is because each group G can be regarded as a category with a single object and whose morphisms are the group elements. However, unlike for functor categories in general, in this particular case the cartesian closed structure is almost as simple as that of the category of sets itself and is worth describing explicitly. We saw in the previous section that [G, Set] has finite products, inherited from Set. So we just have to describe exponentials. If X and Y are G-sets for a group G, then we can make the set Y X of functions

6 Permutations with domain X and codomain Y into a G-set by defining the action of g G on a function F Y X to be g F λx X g (F (g 1 x)). (1.25) The reader should check that this does give a group action on functions (Exercise 1.4). Equivariant functions F : X Y are precisely the elements of Y X that satisfy g F = F for all g G; we leave this as an exercise (Exercise 1.5). Definition (1.25) ensures that the application function app : Y X X Y app λ(f, x) Y X X F x (1.26) is equivariant. For we have app(g F, g x) = {definition of app} (g F)(g x) = {definition of g F} g (F (g 1 (g x))) = {(1.8), (1.3) and (1.9)} g (F x) = {definition of app} g app(f, x). The equivariance of the currying function curry : Y Z X (Y X ) Z curry λf Y Z X, z Z, x X F (z, x) (1.27) is a similar calculation (Exercise 1.6). It follows that app : Y X X Y gives the exponential of Y by X in [G, Set]. For if we have F : Z X Y in [G, Set], then from the usual properties of application and currying in Set, we have that curry F (Y X ) Z is the unique function satisfying app (curry F id X ) = F. So we just have to see that it is equivariant and hence a morphism Z Y X in [G, Set]; but this follows from the equivariance of application, of currying and of F, using Exercise 1.5. Let 1.5 Power sets B {true, false} (1.28)

1.5 Power sets 7 denote the discrete G-set (Example 1.5) on a two element set. Given any G-set X, we can use the bijection between functions X B and subsets of X to transfer the G-action on B X to one on the powerset P X {S S X}. (1.29) Converting a subset S X to a corresponding function χ S : X B true if x S χ S x false if x S (1.30) and acting by g G to get g χ S, the subset {x X (g χ S ) x = true} gives the action of g on S. Since B is discrete, (g χ S ) x = g (χ S (g 1 x)) = χ S (g 1 x). So (g χ S ) x = true if and only if g 1 x S. Therefore Note that g 1 x S ( x S ) x = g x and thus g S = {x S g 1 x S }. (1.31) g S = {g x x S }. (1.32) The associativity and unit properties of the G-action on functions transfer to give the required properties for an action on subsets: g (g S ) = (g g ) S and e S = S. Note also that subset inclusion is preserved by the G-action: S S g S g S. (1.33) Definition 1.8 The equivariant subsets of a G-set X are those S X which are closed under the G-action on X in the sense that for all x X and g G x S g x S. (1.34) So by (1.32), S X is an equivariant subset if g S S holds for all g G. Note that in this case we have S = e S = (g g 1 ) S = g (g 1 S ) g S by (1.33); and hence g S = S for any g G. Thus equivariant subsets are precisely the elements of P X that are fixed by the action of any g G. Compare this with the similar characterization of equivariant functions as elements of Y X in Exercise 1.5. A morphism F : Y X in a category C is a monomorphism if F F 1 = F F 2 implies F 1 = F 2 for any F 1, F 2 : Y. We write F : Y X to indicate that F is a monomorphism. The collection of monomorphisms with codomain X is preordered by the relation (F 1 : Y 1 X) (F 2 : Y 2 X) ( F : Y 1 Y 2 ) F 1 = F 2 F. (1.35) A subobject of X is an equivalence class of monomorphisms with codomain X for

8 Permutations the equivalence relation generated by. When the category is [G, Set] it is not hard to see that the subobjects of a G-set X are in bijection with the equivariant subsets of X; and under this bijection the partial order on subobjects induced by (1.35) corresponds to subset inclusion. (See Exercise 1.7.) We saw above (Theorem 1.7) that [G, Set] is a cartesian closed category. It also has a subobject classifier and hence is a topos (Johnstone, 2002, Example 2.1.4). This means there is an object Ω equipped with a morphism : 1 Ω so that for any monomorphism F : Y X there is a unique morphism χ F : X Ω making F Y 1 X χf Ω a pullback square in [G, Set]. In fact [G, Set] is Boolean (Johnstone, 2002, p 38) since Ω = 1 + 1 is just the discrete two-element set G-set B. For if F : Y X corresponds to the equivariant subset S X, then χ F : X Ω is the characteristic function (1.30) which is an equivariant function, because S is an equivariant subset. Since [G, Set] is a Boolean topos, it provides a model of classical higher-order logic (Johnstone, 2002, chapter D4). Just as for the cartesian closed structure, the interpretation of higher-order logic in [G, Set] is the same as in Set: Proposition 1.9 Let X and Y be G-sets. The following are equivariant subsets: 1. Truth X X. 2. Equality {(x, x ) X X x = x } X X. 2. Membership {(x, S ) X P (X) x S } X P (X). The following are equivariant functions: 4. Conjunction : P (X) P (X) P (X). 5. Negation : P (X) P (X), where S {x X x S }. 6. Universal quantification : P (P (X)) P (X), where S {x X ( S S) x S }. 7. Substitution f : P (Y) P (X), where f : X Y is an equivariant function and f S {x X f (x) S }. 8. Comprehension compr : P (X Y) P (Y) X, where compr S λx X {y Y (x, y) S }. Proof These equivariance properties follow easily from the definition of the action of G on subsets. For example x g ( S ) g 1 x S g 1 x S x g S x (g S )

1.5 Power sets 9 so that g ( S ) = (g S ). The proposition gives a very rich collection of equivariant subsets. Consider the formulas of classical higher-order logic; they are built up from atomic formulas using equality, membership, the propositional connectives, and quantification over iterated product, function and power types. If ϕ(x 1,..., x n ) is such a formula with free variables as indicated, and if each variable x i is interpreted as ranging over a G-set X i, then the Tarski interpretation of ϕ (with product, function and power types interpreted as cartesian products, exponentials and powersets) determines a subset of X 1 X n in the usual way. If the function and relation symbols in ϕ are all interpreted by equivariant functions and subsets, then Theorem 1.9 implies that the interpretation of ϕ(x 1,..., x n ) is an equivariant subset of X 1 X n. Thus we have: Equivariance Principle Any function or relation that is defined from equivariant functions and relations using classical higher-order logic is itself equivariant. We will use this principle to avoid proving that particular constructs are equivariant on a case-by-case basis. The next section gives a first example of this. We end this section with two warnings about the Equivariance Principle. Note 1.10 In applying the Equivariance Principle, one must take into account all the parameters upon which a particular construction depends. For example, regarding G as a G-set as in Example 1.6, we saw there that for any G-set X the action F : G X X F λ(g, x) G X g x is an equivariant function. However, if we fix upon a particular g 0 G, then the function F 0 = F(g 0, ) : X X is not in general equivariant unless G is a commutative group (or g 0 = e), since g F 0 x = (g g 0 ) x whereas F 0 (g x) = (g 0 g) x. Note 1.11 Classical higher-order logic is sometimes formulated using Hilbert s ε-operation, εx.ϕ(x), satisfying ( x X) ϕ(x) ϕ(εx.ϕ(x)). Unless G is a trivial group, such an operation cannot be equivariant see Exercise 1.8. Thus the Equivariance Principle does not apply to constructions employing this strong form of choice. Toposes of the form [G, Set] do satisfy a weaker, internal version of the Axiom of Choice (Johnstone, 2002, Examples 4.5.2(b)). However, when we move from considering equivariance to finite support in the next chapter, even that form of choice fails; see Sect. 2.6.

10 Permutations 1.6 Partial functions Given sets X and Y, the set X Y of partial functions from X to Y is the subset of P (X Y) consisting of all subsets F X Y that are single-valued ( x X)( y, y Y) (x, y) F (x, y ) F y = y. (1.36) We write F x y to mean that F is defined at x X and takes value y Y. Thus F x y (x, y) F. (1.37) More generally, given partial functions F 1 X 1 Y and F 2 X 2 Y, for all x 1 X 1 and x 2 X 2 we define F 1 x 1 F 2 x 2 ( y Y) (x 1, y) F 1 (x 2, y) F 2. (1.38) (F x y is the special case of this when F 1 = F and F 2 = id Y.) More generally still, but less formally, if e and e are expressions denoting partially defined values we write e e to mean that e is defined if and only if e is and in that case they are equal values. This is sometimes referred to as Kleene equivalence. The domain of definition of a partial function F X Y is Dom F {x X ( y Y) (x, y) F}. (1.39) (We reserve the notation dom for the domain of a morphism in a category. Thus in the category of sets and partial functions, given F X Y we have dom F = X, but Dom F may be strictly smaller than X.) If X and Y are G-sets, then using the Equivariance Principle we have that X Y is an equivariant subset of P (X Y) and hence a G-set. As the next result shows, the G-action on partial functions agrees with the action on total functions (1.25). Proposition 1.12 x X If X and Y are G-sets and F X Y, then for all g G and (g F) x g (F(g 1 x)). (1.40) Proof If (g F) x is defined, say (x, y) g F, then (g 1 x, g 1 y) = g 1 (x, y) F; so F(g 1 x) is defined and equal to g 1 y and therefore g (F(g 1 x)) g (g 1 y) = y. Conversely if g (F(g 1 x)) y, then the subexpression F(g 1 x) must also be defined, that is, (g 1 x, y ) F for some y with g y = y. Hence (x, y) = (g (g 1 x), g y ) = g (g 1 x, y ) g F and thus (g F) x y. The elements of Y X are those partial functions F X Y that are also total ( x X)( y Y) (x, y) F. (1.41) Thus Y X is an equivariant subset of P (X Y) and the proposition shows that the

1.7 Quotient sets 11 action of G on subsets (1.31) agrees with the action on functions (1.25) when restricted to Y X. 1.7 Quotient sets We write X/ for the set of equivalence classes [x] {x X x x } of an equivalence relation on a set X. Given a group G, an equivariant equivalence relation on a G-set X is simply an equivalence relation on the underlying set of X which is equivariant as a subset of X X (see Definition 1.8). In this case, for each g G, the function g : X X respects the equivalence relation and hence induces a function on equivalence classes, X/ X/, that we also write as g. Thus g [x] = [g x] (1.42) and we get a G-action on X/, which we call a quotient G-set. Note that by virtue of (1.42), the quotient function q : X X/ q λx X [x] (1.43) is equivariant. Any function F : X Y that respects, in the sense that x x F x = F x holds, induces a unique function F making X q X/ F F Y commute. Note that F is definable within higher-order logic from and F. Thus assuming is an equivariant equivalence relation, by the Equivariance Principle, if F is equivariant, then so is F. 1.8 Finitary permutations So far in this chapter we have considered group actions for an arbitrary group G. Now we specialize to the case we need in the rest of the book, groups of finitary permutations and their actions. Definition 1.13 A permutation π S A is finitary if {a A π a a} is a finite subset of A. Note that id S A is finitary and that the composition and inverse of

12 Permutations finitary permutations are finitary. Therefore we get a subgroup of S A of finitary permutations, denoted Perm A. The transposition (also known as swapping) of a pair of elements a 1, a 2 A is the finitary permutation (a 1 a 2 ) Perm A given for all a A by a 2 if a = a 1 (a 1 a 2 ) a a 1 if a = a 2 (1.44) a otherwise. Note that this definition makes sense even if a 1 = a 2, in which case (a 1 a 2 ) = id. If a 1 a 2, then (a 1 a 2 ) is a 2-cycle, where in general the n-cycle (a 1 a 2 a 3 a n ) is the element of Perm A that maps a 1 to a 2, a 2 to a 3,..., a n 1 to a n, and a n to a 1, while leaving all other elements fixed; here a 1,..., a n have to be n mutually distinct atoms with n 2. Transpositions play a prominent role in what follows, because they generate the group Perm A. Theorem 1.14 Every element π of the group Perm A of finitary permutations on a set A is equal to the composition of a finite sequence of transpositions (a a ) with π a a a π a. (1.45) (The sequence may be empty, in which case its composition is by definition the identity function.) Proof We argue by induction on the size of the finite set {a A π a a}. In the base case when it is empty, π must be the identity function, which is the composition of the empty sequence of transpositions. For the induction step, given π Perm A with {a π a a} non-empty, pick some a 0 in that set and consider π = π (a 0 π 1 a 0 ). It satisfies π a 0 = a 0 and ( a a 0 ) π a = a π a = a. Hence {a π a a} {a π a a} {a 0 }. (1.46) In particular {a π a a} is strictly smaller than {a π a a} and so by induction hypothesis π is a finite composition of transpositions of elements satisfying (1.45) for π and hence also for π in view of (1.46). Hence so is π, because π = {transpositions are idempotent!} π (a 0 π 1 a 0 ) (a 0 π 1 a 0 ) = {definition of π } π (a 0 π 1 a 0 ). and this completes the induction step.

Exercises 13 In view of the theorem, an action of Perm A on a set X is completely determined by the swapping operation swap : A A X X swap λ(a, a, x) A A X (a a ) x. (1.47) This is because every π Perm A is equal to a composition of transpositions and hence π = (a 1 a 1 ) (a 2 a 2 ) (a n a n) (1.48) π x = swap(a 1, a 1, swap(a 2, a 2,... swap(a n, a n, x) )). (1.49) Proposition 1.15 For each Perm A-set X, the function swap : A A X X defined in (1.47) is equivariant (regarding A as a Perm A-set as in Example 1.3). Proof Note that π (a a ) = (π a π a ) π, for any π Perm A and a, a A. Therefore π swap(a, a, x) = π ((a a ) x) = (π a π a ) (π x) = swap(π a, π a, π x). Exercises 1.1 If G is a group and X a G-set, show that λg G (λx X g x) is a homomorphism of groups from G to the group S X of permutations of X. Show conversely that if θ : G S X is a homomorphism, then λ(g, x) G X θ g x is a G-action on X. 1.2 Show that the function mapping a G-set Y to the set Γ Y defined in (1.15) extends to a functor [G, Set] Set. Writing X for the discrete G-set on a set X, show that extends to a functor Set [G, Set] that is left adjoint to Γ. In other words there is a bijection [G, Set]( X, Y) Set(X, Γ Y) which is natural in X and Y. 1.3 If G is a group, show that its multiplication (g, g ) g g is an action of G on itself. If G denotes the resulting G-set, show that there is no equivariant function G G (where G denotes the G-set from Example 1.6) unless G = {e} is a trivial group. 1.4 Show that definition (1.25) has the properties (1.8) and (1.9) required of a group action. 1.5 Let X and Y be G-sets. Show that a function F from X to Y is equivariant (1.10) if and only if it satisfies g F = F for all g G, with g F as defined in (1.25). 1.6 Show that currying (1.27) is equivariant: g curry F = curry(g F ).

14 Permutations 1.7 Show that an equivariant function F : X Y is an isomorphism in [G, Set] if and only if it is a bijection. Show that it is a monomorphism if and only if it is an injective function. [Hint: consider the pullback of F along itself.] Deduce that subobjects of a G-set are in bijection with equivariant subsets of X. 1.8 Let P ne X denote the set of non-empty subsets of a set X. Note that if X is a G-set, then the G-action (1.31) restricts to P ne X and makes it a G-set. Now let X be the G-set G from Exercise 1.3 and suppose that G is non-trivial (that is, contains some element not equal to the group unit). Show that there is no equivariant function c : P ne X X satisfying ( S P ne X) c S S. [Hint: consider the action of some g e on c S when S is the whole of G.] 1.9 Let, F and F be as in section 1.7. Instead of appealing to the Equivariance Principle, show by explicit calculation that if and F are equivariant, then F satisfies g (F[x] ) = F(g [x] ) for all g G and x X.

2 Support This chapter introduces the central concept of the theory of nominal sets, namely the support of an element in a set equipped with a permutation action. From now on A denotes a fixed, countably infinite set whose elements a, b, c,... we call atomic names. 2.1 The category of nominal sets Let X be a set equipped with an action of the group Perm A of finitary permutations of A. A set of atomic names A A is a support for an element x X if for all π Perm A (( a A) π a = a) π x = x. (2.1) The following characterization of support in terms of transpositions is helpful. Proposition 2.1 x if and only if Suppose X is an Perm A-set and x X. A subset A A supports ( a 1, a 2 A A) (a 1 a 2 ) x = x. (2.2) Notation We denote set subtraction by X Y. Thus A A = {a A a A}. Proof If a 1, a 2 A A, then (a 1 a 2 ) a = a for any a A. So if A supports x, it clearly satisfies (2.2). Conversely, suppose A satisfies (2.2) and that π Perm A fixes each element of A. We have to show that π x = x. Recall from Theorem 1.14 that π can be written as a composition of transpositions (a 1 a 2 ) satisfying π a 1 a 1 a 2 π a 2. Since π fixes each element of A, such a transposition satisfies a 1, a 2 A and hence by (2.2), (a 1 a 2 ) x = x. Therefore, letting each transposition in the sequence whose composition is π act on x in turn, we eventually conclude that π x = x, as required.

16 Support Clearly each element of an Perm A-set is supported by the whole of A, which is an infinite set. We will be interested in elements that are finitely supported in the sense that there is some finite set of atomic names that is a support for the element. Definition 2.2 A nominal set is an Perm A-set all of whose elements are finitely supported. Nominal sets are the objects of a category Nom whose morphisms, composition and identities are as in the category of Perm A-sets [Perm A, Set]. Thus Nom is a full subcategory of [Perm A, Set]. The dependence of Nom upon A is left implicit. Proposition 2.3 If A 1 and A 2 are finite supports for an element x of an Perm A- set, then so is A 1 A 2. Proof By Proposition 2.1 we just have to show that if a, a A (A 1 A 2 ), then (a a ) x = x. The latter certainly holds if a = a, so we may suppose a a. In that case, picking any element a of the infinite set A (A 1 A 2 {a, a }), then (a a ) = (a a ) (a a ) (a a ). (2.3) Note that either a A 1, or a A 2 ; and similarly for a. So each of the transpositions on the right-hand side of (2.3) swaps atomic names that are either both not in the support set A 1, or both not in the support set A 2 (since a is definitely not in either of A 1 or A 2 ). So (a a ) is a composition of transpositions each of which fixes x and hence itself fixes x. Suppose X is a nominal set and x X. Since x possesses some finite support, by the proposition supp X x {A P A A is a finite support for x} (2.4) is again a finite support for x and is the least one with respect to subset inclusion. We write it as supp x when X is clear from the context. Exercise 2.1 gives an equivalent formulation of supp x from Gabbay and Pitts (2002). Example 2.4 The nominal set of atomic names is given by A regarded as an Perm A-set as in Example 1.3. Clearly each a A is finitely supported by {a} and this is the smallest support, so that supp a = {a}. Example 2.5 The discrete nominal set on a set X is given by the Perm A-action of Example 1.5, for which we have supp x = for each x X. Example 2.6 We saw in Example 1.4 that the set Σ(A) of terms over an algebraic signature Σ with variables from A is a Perm A-set. It is in fact a nominal set with supp t equal to the finite set var t of variables occurring in t. This set is recursively

2.1 The category of nominal sets 17 defined by: var a = {a} var op(t 1,, t n ) = var t 1 var t n. That var t is the least support for t follows from the fact that it is a strong support in the sense of the following theorem due to Tzevelekos (2008, section 2.1.2). Property (2.5) for A = var t and x = t can be proved by induction on the structure of the term t. Theorem 2.7 By definition, a set of atomic names A A strongly supports an element x of a nominal set X if and only if In this case if A is finite, then A = supp x. (( a A) π a = a) π x = x. (2.5) Proof If A strongly supports x, then it certainly supports x and hence supp x A. If A is finite, then we also have A supp x. For then A A is non-empty, say a A A, and for any a A supp x, (a a ) a = a a A. So from (2.5) we conclude that (a a ) x x; but this contradicts the fact that a, a supp x. Since A is a Perm A-set, so is its powerset P A, as in section 1.5. It is not hard to see that it contains elements that are not finitely supported (Exercise 2.2); but as the next result shows, we can identify exactly which subsets of A are finitely supported. Proposition 2.8 A set A A of atomic names is a finitely supported element of P A if and only if either it or its complement A A is finite. In the latter case one says that A is cofinite. Proof Note that (a a ) A = A if and only if (a A a A) (a A a A). So from Proposition 2.1 it follows that A A supports A P A if and only if either A A, or A A A. Hence the result. Example 2.9 Each finite element of P A is supported by itself and this is the least support. So we get a nominal set P f A of finite sets a of atomic names with π a = {π a a a} and supp a = a. Note that a is not a strong support for a in the sense of Theorem 2.7, so long as it has at least two elements. Proposition 2.10 is equivariant: For each nominal set X the support function supp : X P f A π (supp x) = supp(π x) (2.6) holds for all π Perm A and x X.

18 Support Proof In view of (2.1) and (2.4), the support function is definable within classical higher-order logic from the action function λ(π, x) Perm A X π x; and we saw in Example 1.6 that the latter is equivariant. Therefore the theorem follows from the Equivariance Principle. We will revisit the various constructions on G-sets from chapter 1 and see whether they preserve the property of being a nominal set. The following results about support and equivariant functions will be useful for doing this. Lemma 2.11 Suppose that f : X Y is an equivariant function between Perm A-sets. 1. If A is a support for x X, then it is a support for f x Y. So if X and Y are nominal sets, then ( x X) supp Y ( f x) supp X x. (2.7) 2. If f is injective (( x, x X) f x = f x x = x ), then A is a support for x X if and only if it is a support for f x Y. So if Y is a nominal set, then so is X and ( x X) supp X x = supp Y ( f x). (2.8) 3. If f is surjective (( y Y)( x X) f x = y) and X is a nominal set, then so is Y. Proof For part 1, suppose A supports x X. If π Perm A satisfies ( a A) π a = a, then by (2.1) x = π x and hence f x = f (π x) = π ( f x) since f is equivariant. Thus A supports f x in Y. Therefore if X and Y are nominal sets and x X, then supp X x supports f x and hence contains the smallest support, supp Y ( f x). For part 2, suppose f is injective and that A supports f x. So if π Perm A satisfies ( a A) π a = a, then by (2.1) f x = π ( f x) and hence f x = f (π x) since f is equivariant; as it is also injective this implies x = π x. Therefore A is a support for x. So if Y is nominal, each x X possesses a finite support, namely supp Y ( f x); hence X is nominal. In this case supp Y ( f x) contains the smallest support for x, supp X x; and conversely, supp Y ( f x) is contained in supp X x by part 1. Finally, part 3 follows immediately from part 1, since each y Y possesses a finite support, namely supp X x where x is some element of X such that f x = y. 2.2 Products and coproducts Coproducts in Nom are constructed just as in [Perm A, Set], by taking disjoint unions (see section 1.2). This is because, for any family of nominal sets (X i i I),

2.2 Products and coproducts 19 each element (i, x) of i I X i is supported by supp Xi x. For if π fixes each a supp Xi x, then π x = x and hence π (i, x) = (i, π x) = (i, x). Indeed, since inj i = λx X i (i, x) is an injective equivariant function from X i to i I X i, by (2.8) we have supp i I X i (i, x) = supp Xi x. (2.9) The situation for products is more complicated. Finite cartesian products of nominal sets are again nominal, but infinite products in Nom are not given in general by the product in [Perm A, Set]. Proposition 2.12 The product X 1 X n in [Perm A, Set] of finitely many nominal sets is another such (and hence is their product in Nom). For each (x 1,..., x n ) X 1 X n supp X1 X n (x 1,..., x n ) = supp X1 x 1 supp Xn x n. (2.10) Proof Recall from section 1.2 that the permutation action for products is given componentwise: π (x 1,..., x n ) = (π x 1,..., π x n ). So if π fixes each atomic name in supp X1 x 1 supp Xn x n, then it also fixes (x 1,..., x n ). Therefore each (x 1,..., x n ) is finitely supported by supp X1 x 1 supp Xn x n and X 1 X n is a nominal set. To prove (2.10) it just remains to show that supp X1 x 1 supp Xn x n is contained in supp(x 1,..., x n ); but since each projection function proj i : X 1 X n X i is equivariant, by (2.7) we have supp Xi x i = supp Xi (proj i (x 1,..., x n )) supp(x 1,..., x n ) for each i I. Generalizing from finite to infinite cartesian products i I X i, as in the above proof we have that an element (x i i I) is supported by i I supp Xi x i, but that set may not be finite (Exercise 2.3). Nevertheless, the category Nom does have infinite products, because of the following result. Theorem 2.13 For each Perm A-set X there is an equivariant function X fs X from a nominal set X fs to X that is universal among all such. In other words, given any equivariant function F from a nominal set Y to X Y F X fs F X there is a unique equivariant function F making the above diagram commute. (Thus Nom is a co-reflective subcategory of [Perm A, Set].) Proof First note that if x X is supported by A P A, then for any π Perm A,

20 Support π x is supported by π A. (This is a consequence of the Equivariance Principle mentioned in section 1.5; or one can prove it directly from the definition of support.) So X fs {x X x is finitely supported in X}. (2.11) is an equivariant subset of X and hence an Perm A-set with permutation action inherited from X. The inclusion X fs X gives an injective equivariant function and therefore X fs is a nominal set by (2.8). To see that it has the required universal property it suffices to show that any F : Y X in [Perm A, Set] with Y Nom maps elements of Y into the subset X fs X; but from part 1 of Lemma 2.11, for each y Y we have that supp Y y is a finite support for F y and hence F y X fs. Combining the description of products in [Perm A, Set] from section 1.2 with the above theorem, we get: Corollary 2.14 Given a family of nominal sets X i indexed by the elements i of some set I, their product in Nom is given by ( i I X i ) fs with product projections ( i I X i ) fs i I X i proj i X i. Thus infinite products in Nom may contain rather few elements; see Exercise 2.4. 2.3 Natural numbers We saw in section 1.3 that the natural numbers object in the category of G-sets is given by N with the discrete G-action together with the usual zero and successor functions. As we noted in Example 2.5, every discrete Perm A-set is a nominal set. It follows that 1 zero N suc N is also the natural numbers object in the category Nom of nominal sets and equivariant functions. 2.4 Functions Recall from section 1.4 the definition of the function G-set Y X. When G = Perm A, the following characterization of the support of elements of Y X is useful. Lemma 2.15 Given X, Y [Perm A, Set], a set of atomic names A A supports F Y X if and only if for all π Perm A (( a A) π a = a) ( x X) F(π x) = π (F x). (2.12)

2.4 Functions 21 In particular, F has empty support if and only if it is an equivariant function (Definition 1.2). Proof It follows from the definition of the action of permutations on functions (1.25) that π F = F holds if and only if ( x X) F(π x) = π (F x). Definition 2.16 If X and Y are nominal sets, we write X fs Y for the nominal set (Y X ) fs formed from Y X as in (2.11), and call it the nominal function set of X and Y. Restricting the application function app : Y X X Y to finitely supported functions, we get an equivariant function app : (X fs Y) X Y app λ(f, x) (X fs Y) X F x. (2.13) Currying an equivariant function F : Z X Y to get curry F : Z Y X as in section 1.4, by Theorem 2.13 if Z is nominal then curry F factors through (Y X ) fs Y X to give an equivariant function curry F : Z (X fs Y) curry F λz Z, x X F(z, x). (2.14) Theorem 2.17 Nom is a cartesian closed category. Proof We have already seen that Nom has finite products. Furthermore (Y X ) fs gives the exponential of Y by X in Nom for general category-theoretic reasons: Nom is a co-reflective full subcategory of [Perm A, Set] (Theorem 2.13) and the inclusion of Nom into [Perm A, Set] preserves finite products. Thus there are bijections of hom-sets Nom(Z X, Y) = {binary products in Nom are as in [Perm A, Set]} [Perm A, Set](Z X, Y) {Y X is the exponential in [Perm A, Set]} [Perm A, Set](Z, Y X ) {Theorem 2.13} Nom(Z, (Y X ) fs ) = {definition of X fs Y} Nom(Z, X fs Y) (natural in X, Y, Z Nom) given by sending F Nom(Z X, Y) to curry F Nom(Z, X fs Y). Not every function between nominal sets is finitely supported; in other words X fs Y can be a proper subset of Y X. Here is an example that shows this.

22 Support Example 2.18 Consider the function Perm A-set Y X where X is the set N of natural numbers regarded as a discrete nominal set (Example 2.5) and where Y is the nominal set P f A of finite sets of atoms, as in Example 2.9. Let F Y X be a function that maps each natural number n N to some finite set of atoms of cardinality n. Then there is no finite set of atoms A that supports F in Y X. To see this we suppose A is a finite support for F and derive a contradiction. Since each n N has empty support, A is also a support for (F, n) Y X X; and then since application app : Y X X Y is equivariant, by part 1 of Lemma 2.11 we have that A is a support for F n P f A. We noted in Example 2.9 that the least support of a finite set of atoms is the set itself. Therefore we have proved ( n N) F n A. Taking n larger than the cardinality of the finite set A gives a contradiction, since by assumption on F, F n is a set of cardinality n and so cannot be a subset of A. 2.5 Power sets Lemma 2.19 If S X is an equivariant subset of a nominal set X, then restricting the Perm A-action on X to S, S is a nominal set. Proof By part 2 of Lemma 2.11 applied to the inclusion S X, the elements of S are finitely supported because they are so in X. The subobjects of X Nom correspond to equivariant subsets of X. To see this we need to describe pullbacks in Nom. A pullback for a pair of morphisms F 1 and F 2 with common codomain in a category is a commutative square P P 2 X 2 P 1 F 2 X 1 Y F 1 with the universal property that given any G i : Y X i with F 1 G 1 = F 2 G 2, there is a unique morphism from Y to P making the two triangles commute: Y G 1 G 2 P P2 X 2 P 1 X 1 F 1 Y. F 2 When the category is Nom, as for binary products, pullbacks are created by taking

pullbacks of the underlying functions: 2.5 Power sets 23 P {(x 1, x 2 ) X 1 X 2 F 1 x 1 = F 2 x 2 } P i = λ(x 1, x 2 ) P x i (Note that P is an equivariant subset of the product X 1 X 2 and hence by part 2 of Lemma 2.11 is a nominal set.) By considering the pullback of a monomorphism against itself, it follows that a morphism F : X Y in Nom is a monomorphism if and only if F is an injective function. Combining this observation with part 2 of Lemma 2.11 we conclude that the subobjects of X in Nom are the same as its subobjects in [Perm A, Set] and correspond to equivariant subsets of X. Theorem 2.20 The category Nom of nominal sets and equivariant functions is a Boolean topos with a natural number object. Proof We have already seen that Nom is cartesian closed and possesses a natural number object. Just as in [Perm A, Set], the discrete nominal set B = {true, false} is a subobject classifier, because of the above observations about pullbacks and subobjects in Nom. As in any topos, the exponential X fs B = (B X ) fs of the subobject classifier by an object X gives a form of powerset object in Nom. The isomorphism in [Perm A, Set] between B X and P X (section 1.5) restricts to an isomorphism between the finitely supported elements of B X and P X. However, as the next result shows, to check that S X is a finitely supported element of P X it suffices to check that containments π S S rather than equalities π S = S hold for all permutations π fixing the atomic names in a support set. Lemma 2.21 Given X [Perm A, Set], a set of atomic names A A supports S P X if and only if ( π Perm A)(( a A) π a = a) ( x S ) π x S. (2.15) In particular, S has empty support if and only if it is an equivariant subset of X (Definition 1.8). Proof Note that by (1.32), ( x S ) π x S is equivalent to π S S. Note as well that any π satisfying ( a A) π a = a) also satisfies ( a A) π 1 a = a). So if (2.15) holds, then we have π S S and π 1 S S and hence π S = S. So (2.15) implies that A supports S in P X; and the converse is immediate. The following simple corollary of this lemma will be useful. Proposition 2.22 Given X, Y [Perm A, Set], if A A supports both S P (X Y) and x X, then it also supports {y Y (x, y) S } P Y.

24 Support Proof Suppose π Perm A satisfies ( a A) π a = a. Then π x = x and π S = S. So for all y in {y Y (x, y) S } we have (x, π y) = (π x, π y) = π (x, y) π S = S and therefore π y is also in {y Y (x, y) S }. So we can apply Lemma 2.21 to deduce that A supports {y Y (x, y) S }. Definition 2.23 If X is a nominal set, we write P fs X for the nominal set (P X) fs formed from the power Perm A-set P X using (2.11). We call P fs X the nominal powerset of X. For any nominal set X, from parts 1 3 of Proposition 1.9 we have the following equivariant and hence finitely supported subsets. Truth X P fs X. Equality {(x, x ) X X x = x } P fs (X X). Membership {(x, S ) X P fs X x S } P fs (X P fs X). Furthermore, if f : P X 1 P X n P X is an equivariant function and (S 1,..., S n ) P fs X 1 P fs X n, then by part 1 of Lemma 2.11 and (2.10), f (S 1,..., S n ) is supported by the union of the supports of each S i and hence is in P fs X. So parts 4 7 of Proposition 1.9 give us the following equivariant functions. Conjunction : P fs X P fs X P fs X. Negation : P fs X P fs X, where S {x X x S }. Universal quantification : P fs (P fs X) P fs X, where S {x X ( S S) x S }. Substitution f : P fs Y P fs X, where f : X Y is an equivariant function and f S {x X f x S }. Finally, the analogue of part 8 of Proposition 1.9 is the following equivariant function. Comprehension compr : P fs (X Y) (X fs P fs Y), where compr S λx X {y Y (x, y) S }. To see that this is well-defined, note that given S P fs (X Y) and x X, by Proposition 2.22 compr S x = {y Y (x, y) S } is finitely supported by supp S supp x. Hence compr S (P fs Y) X ; but since we know from Proposition 1.9 that compr is equivariant, by part 1 of Lemma 2.11 we have compr S ((P fs Y) X ) fs = X fs P fs Y. From these facts we get a version for nominal sets of the Equivariance Principle from section 1.5: Finite Support Principle Any function or relation that is defined from finitely supported functions and subsets using classical higher-order logic is itself finitely supported, provided we restrict any quantification over functions or subsets to range over ones that are finitely supported.

2.6 Failure of choice 25 2.6 Failure of choice Although nominal sets provide a model of classical higher-order logic, as the following theorem shows, they do not model choice principles. Indeed Fraenkel and Mostowski introduced permutations and finite supports into logic in the first place in order to construct a model of set theory with atoms not satisfying the Axiom of Choice. Theorem 2.24 Let P nefs A be the nominal set of non-empty, finitely supported subsets of A (where the Perm A-action on such subsets is as for P fs A). No function C : P nefs A A satisfying can have finite support in the Perm A-set (P nefs A) A. ( S P nefs A) C S S (2.16) Proof We suppose C satisfying (2.16) is supported by a finite subset A A and derive a contradiction. Let S be the cofinite set A A. From Proposition 2.8 we have that S P fs A; and being cofinite, S is in particular non-empty. Therefore we can apply C to S to get an atomic name a 0 C S S = A A. Since A {a 0 } is finite and A is infinite, there is some a 1 A (A {a 0 }) S. Since a 0, a 1 S, we have (a 0 a 1 ) S = S ; and since A supports C and a 0, a 1 A, we also have (a 0 a 1 ) C = C. So by definition of the Perm A-action on (P nefs A) A, (a 0 a 1 ) (C S ) = ((a 0 a 1 ) C)((a 0 a 1 ) S ) = C S. Therefore a 1 = (a 0 a 1 ) a 0 = (a 0 a 1 ) (C S ) = C S = a 0, contradicting the fact that a 1 was chosen to be distinct from a 0. So in particular Nom does not model Hilbert s ε-operator mapping non-empty subsets at each type to elements of those subsets. We remarked in Note 1.11 that this is already the case for [Perm A, Set] and equivariant properties. However, when we move to Nom and finitely supported properties even weaker, internal choice principles fail to hold. For example, the above theorem shows that Nom fails to satisfy the higher-order logic formula ( R P (X Y)) (( x X)( y Y) (x, y) R) ( f Y X )( x X) (x, f x) R. (Interpret X as P nefs A, Y as A and R as {(S, a) P nefs A A a S } and apply the theorem.) Nevertheless, many uses of choice in theorem-provers based on classical higherorder logic (such as the HOL theorem prover, Gordon and Melham, 1993) are for making definitions, where the thing defined is unique. Such restricted uses of choice are consistent with the model of higher-order logic that Nom provides (see Pitts, 2003, section 8).

26 Support 2.7 Partial functions If X and Y are nominal sets, we saw in section 1.6 that the set X Y of partial functions is an equivariant subset of P (X Y). Applying fs to it we obtain the set of finitely supported partial functions X fs Y (X Y) fs. (2.17) Thus the elements of X fs Y are the finitely supported subsets of X Y that are single-valued (1.36). This gives the object of partial maps from X to Y in Nom; that is, there is a natural correspondence between partial maps (Johnstone, 2002, p 100) Z X Y (2.18) and morphisms Z (X fs Y). Indeed, partial maps in Nom correspond to equivariant partial functions, that is, partial functions that are equivariant as subsets. Given such an F (Z X) Y, the corresponding equivariant function curry F : Z (X fs Y) maps each z Z to curry F z = {(x, y) X Y ((z, x), y) F} This is a partial function because F is one; and it is finitely supported by supp z, because of Proposition 2.22. The correspondence between F and curry F is mediated by the equivariant partial function app (X fs Y) X Y app {((F, x), y) ((X fs Y) X) Y (x, y) F}. (2.19) that applies a partial function to its argument. For each F, curry F is the unique equivariant function Z (X fs Y) satisfying ( z Z)( x X) app(curry F z, x) F(z, x) (2.20) (where is Kleene equivalence see section 1.6). Since Nom is a Boolean topos (Theorem 2.20), there is a natural isomorphism between X fs Y and the exponential X fs (Y + 1). This is given by restricting to finitely supported elements the usual correspondence between partial functions to Y and total functions to Y augmented with an element for undefined, that is, to Y + 1.