The Generalised Continuum Hypothesis Implies the Axiom of Choice in Coq
Total Page:16
File Type:pdf, Size:1020Kb
The Generalised Continuum Hypothesis Implies the Axiom of Choice in Coq Dominik Kirst Felix Rech Saarland University Saarland University Saarland Informatics Campus, Saarbrücken, Germany Saarland Informatics Campus, Saarbrücken, Germany [email protected] [email protected] Abstract between X and P¹Xº for every infinite X. Therefore, GCH We discuss and compare two Coq mechanisations of Sier- narrows the range of the power set operation otherwise left piński’s result that the generalised continuum hypothesis rather underspecified by the usual Zermelo-Fraenkel (ZF) (GCH) implies the axiom of choice (AC). The first version axioms. AC, in one typical set-theoretic formulation, states shows the result, originally stated in first-order ZF set-theory, that every set X of non-empty sets admits a choice function for a higher-order set theory convenient to work with in Coq. f such that f ¹xº 2 x for all x 2 X. The second version presents a corresponding theorem for That GCH as a statement about power sets and cardinal- Coq’s type theory itself, concerning type-theoretic formu- ity implies AC, a statement providing a means to uniformly lations of GCH and AC. Both versions rely on the classical pick elements from non-empty sets, may seem surprising law of excluded middle and extensionality assumptions but indeed [14]. However, since AC is equivalent to the well- we localise the use of axioms where possible. ordering theorem (WO), asserting that every (infinite) set can be well-ordered, and since well-orders transport along in- CCS Concepts: • Theory of computation ! Type the- jections, there is a well-established strategy how Sierpiński’s ory; Constructive mathematics; Higher order logic. result can be deduced. Intuitively, given an infinite set X, the ¹ º Keywords: dependent type theory, higher-order set theory, intermediate step is to construct a well-ordered set H X , for generalised continuum hypothesis, axiom of choice, Coq instance the Hartogs number of X [18], which is not embed- dable into X but bounded by a finite iteration of the power ACM Reference Format: set on X, i.e. with jH¹Xºj 6≤ jX j but jH¹Xºj ≤ jPk ¹Xºj for Dominik Kirst and Felix Rech. 2021. The Generalised Continuum some number k. Deducing jX j ≤ jH¹Xºj would now suffice Proceedings Hypothesis Implies the Axiom of Choice in Coq. In in order to transport the well-order of H¹Xº onto X and to of the 10th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP ’21), January 18–19, 2021, Virtual, Den- conclude WO and thus AC. However, since cardinalities need j ¹ ºj 6≤ j j mark. ACM, New York, NY, USA, 14 pages. https://doi.org/10.1145/ not be comparable in the absence of AC, just H X X 3437992.3439932 is not enough to deduce jX j ≤ jH¹Xºj. Yet applying GCH on a suitable instance yields that either jX j ≤ jH¹Xºj as desired k−1 1 Introduction or jH¹Xºj ≤ jP ¹Xºj, the latter allowing for iterating the argument ultimately terminating since jH¹Xºj 6≤ jX j.1 An early but somewhat surprising result in axiomatic set the- Sierpiński’s theorem as a result in first-order set theory has ory states that the generalised continuum hypothesis (GCH) been canonised in standard textbooks (e.g. [38], we follow implies the axiom of choice (AC), already announced by their wording of “Sierpiński’s theorem” for simplicity and Tarski in 1926 [27] and proven by Sierpiński in 1947 [35]. are conscious of other results referred to by the same name) GCH, generalising Cantor’s continuum hypothesis stating and in fact mechanised in Metamath by Carneiro [9].2 In that there are no cardinalities between the set N of natu- this paper, in contrast, we study Sierpiński’s theorem as a ral numbers and its power set P¹Nº, rules out cardinalities statement in higher-order set theory, disposing of the need Permission to make digital or hard copies of all or part of this work for for first-order encodings, as well as in dependent type the- personal or classroom use is granted without fee provided that copies ory, disposing of the axiomatic framework altoghether, and are not made or distributed for profit or commercial advantage and that provide respective mechanisations in Coq [42].3 copies bear this notice and the full citation on the first page. Copyrights As argued in a previous paper [24], higher-order set theory for components of this work owned by others than the author(s) must is a natural framework for mechanising set-theoretic results be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific in proof assistants implementing a higher-order logic. Specif- permission and/or a fee. Request permissions from [email protected]. ically, the ZF axiom scheme used to express replacement for CPP ’21, January 18–19, 2021, Virtual, Denmark © 2021 Copyright held by the owner/author(s). Publication rights licensed 1Sierpiński’s original proof works with k = 3 and hence applies GCH three to ACM. times. A proof applying GCH only twice was later given by Specker [40]. ACM ISBN 978-1-4503-8299-1/21/01...$15.00 2See Section 8.3 for a more detailed comparison to Carneiro’s work. https://doi.org/10.1145/3437992.3439932 3Available at https://www.ps.uni-saarland.de/extras/sierpinski/. CPP ’21, January 18–19, 2021, Virtual, Denmark Dominik Kirst and Felix Rech every first-order formula ϕ¹x;yº describing a functional rela- Regarding the role of additional axioms, it is obvious tion can be condensed into a single axiom simply quantifying that a result from classical set theory does not necessar- over all relations, not just the first-order definable ones. So ily transport to Coq’s constructive type theory directly. In in consequence there is no need to represent the syntax of fact, we will assume functional extensionality (FE), proposi- first-order logic and the full expressivity of the meta-logic tional extensionality (PE), and the law of excluded middle can be used. In particular regarding Sierpiński’s theorem, LEM := P : P: P _:P throughout this paper. Note that every function on the meta-level can be encoded as a set- FE and PE8 together imply that predicates p : X ! P are theoretic representation, which makes the central notion of determined by their elements and that both PE and LEM sep- cardinality coincide on both levels. This is a fundamental arately imply proof irrelevance (PI) and hence the existence difference from first-order set theory, where, for instance, ex- of well-behaved subtypes Σx : X : px. While FE and PE are ternally countable models with internally uncountable sets only needed for the mentioned shortcuts and could possibly exist as noted early on by Skolem [36]. be circumvented, the necessity of LEM shall be subject of This simplification of axiom schemes, together with fur- further investigation. Furthermore, we first give a proof vari- ther streamlining of the foundation and infinity axioms, ant relying on a unique choice operator (UC) to identify total yields a higher-order version of ZF very convenient to work functional relations with functions for a simplified presenta- with in Coq. Therefore complementing [9], we give a com- tion in alignment with the usual set-theoretic practice. That pact Coq mechanisation using features like inductive pred- this requirement can be eliminated is shown afterwards. icates and recursive function definitions although still pre- The remaining text is organised as follows. We begin by senting the argument in its typical set-theoretic outline. Es- introducing the general notions of cardinality and orderings pecially, this framework admits a notion of inductively char- in Section2. Then, in the first part of the paper, the set- acterised ordinals similar to the inductive treatment of the theoretic version of Sierpiński’s theorem will be presented, cumulative hierarchy in [24]. Going one step further, in the with a focus on the representation of ordinals (Section3) second part of the paper, we will contrast this set-theoretic and the Hartogs numbers (Section4). The second part then development with a type-theoretic version of Sierpiński’s outlines the type-theoretic version, comprising the encod- result that does without any intermediate axiomatisation. ing of the Hartogs numbers as types (Section5) and the The fact that, if one interprets sets as types in a type uni- remaining argument with (Section6) and without (Section7) verse T, statements usually rendered in set theory have natu- employing UC. Both parts can be read independently, only ral counterparts in dependent type theory (possibly extended the analogous conclusion of Sierpiński’s theorem after con- with axioms regarding extensionality and classical logic) has structing the Hartogs numbers is left out in the first part been illustrated in many places, for instance in [19], [43], to avoid redundancy. We conclude with some remarks on and [37] with type-theoretic versions of Zermelo’s result that the comparison of both versions, on their respective Coq AC implies WO. In particular, type theories as implemented mechanisations, as well as on related and future work in in Coq with its impredicative universe P of propositions, pro- Section8. All statements in this PDF version are hyperlinked viding the necessary notions of anonymous propositional with HTML documentation of the Coq development. existence and power sets, are well-suited for such a synthetic reformulation of set-theoretic results. 2 Cardinality and Well-Orderings In our case, we can formulate GCH in Coq by We use common notation for dependent product x: Fx, de- 8 GCHT : P := XY : T: jNj ≤ jX j ≤ jY j ≤ jX ! Pj pendent sum Σx: Fx, (binary) product X × Y , (binary) sum 8 ! jY j ≤ jX j _ jX ! Pj ≤ jY j X + Y , and function types X ! Y in the type universe (hier- archy) T.