Abstract 1 Introduction 2 Coq preliminaries 3 Inductive covers 4 The FAN theorem for inductive covers 5 Weaker variants of the contrapositive of Kőnig’s lemma 6 Two examples of replacements of Kőnig’s lemma 7 Conclusion References

Constructive Substitutes for Kőnig’s Lemma

Dominique Larchey-Wendling ORCID Université de Lorraine, CNRS, LORIA, F-54000 Nancy, France
Abstract

We propose weaker but constructively provable variants of the contrapositive of Kőnig’s lemma. We derive those from a generalization of the FAN theorem for inductive bars to inductive covers, for which we give a concise proof. We compare the positive, negative and sequential characterizations of covers and bars in classical and constructive contexts, giving precise accounts of the role played by the axioms of excluded middle and dependent choice. As an application, we discuss some examples where the use of Kőnig’s lemma can be replaced by one of our weaker variants to obtain fully constructive accounts of results or proofs that could otherwise appear as inherently classical.

Keywords and phrases:
Kőnig’s lemma, FAN theorem, constructive mathematics, inductive covers, inductive bars, almost full relations, inductive type theory, Coq
Funding:
Dominique Larchey-Wendling: partially supported by NARCO (ANR-21-CE48-0011).
Copyright and License:
[Uncaptioned image] © Dominique Larchey-Wendling; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Type theory
; Theory of computation Constructive mathematics
Editors:
Rasmus Ejlers Møgelberg and Benno van den Berg

1 Introduction

Kőnig’s (infinity) lemma, named after Dénes Kőnig, was originally published as a theorem of graph theory [18]. Nowadays, it is usually conflated with the following statement:

Any infinite tree which is finitely branching has an infinite branch.111the original statement rather talks about paths in a graph.

The restriction to at most binary trees is of particular importance because it can be stated within lightweight foundations like e.g. 𝑅𝐶𝐴0 [26], and is usually called weak Kőnig’s lemma (𝑊𝐾𝐿). Notice that Kőnig’s lemma is also used in its contrapositive form:

Any finitely branching tree with only finite branches must be finite.

Classical mathematicians would not mind switching between the two formulations but herein, we refrain from using excluded middle at will, and we adopt a constructivist point of view. In this context, that contrapositive form is sometimes referred to as “Brouwer’s FAN theorem” [5, p. 13]. Although there is no universal agreement on what constitutes constructive mathematics, we use the inductive type theory that is the basis of Coq, free of additional axioms, as our constructive foundations.

Kőnig’s lemma plays critical roles in various fields of mathematics like logic, computability, tiling theory, etc. and has been investigated by reverse mathematics, e.g. as 𝑊𝐾𝐿0 in [26], and constructive reverse mathematics [2, 3]. Although some of our investigations might be relevant to the program of reverse mathematicians, we do not follow that approach. We favor a more pragmatic perspective: since the lemma does not belong to the realm of purely constructive mathematics, can we propose weaker alternatives that could be used, not as drop-in, but rather as low cost replacements for Kőnig’s lemma? Of course, we require that those alternatives are constructively provable.

Kőnig’s lemma can (in particular) be used to establish the termination of algorithms, and typically has been used for the decision procedure of implicational relevance logic [8, 17]. It is instrumental to show the existence of Harvey Friedman’s [11] TREE(n) monster (extremely fast growing) function, in combination with Kruskal’s tree theorem, see e.g. [13] where both proofs rely on classical mathematics. These are two example applications of our tools aimed at giving constructive accounts of what could otherwise look inherently classical.

As simple as it sounds, Kőnig’s lemma involves the notion of infinite tree. Hence, the trees cannot simply be understood as the inductively defined structure to be found in computer science (these are always finite). Also, the notion of infinite is not as straightforward in the constructive world. In reverse mathematics, where the usage of versatile data structures may be constrained, a tree is often conflated with its set of finite branches (so finite sequences of nodes where the next node is a son of the current node). As such, trees are nonempty, prefix closed, sets of finite sequences, possibly with a computable membership predicate. And infinite branches are sequences for which every finite prefix belongs to the tree, i.e. the upper limit of a growing sequence of finite branches of the tree.

In that context, one can prove Kőnig’s lemma using excluded middle and a weak form of the axiom of choice (e.g. dependent choice). If a canonical choice can be made over the sons, typically when there is a total order that can sort the sons at every node of the tree, the infinite construction process in the proof can be determinized (by choosing the least son) and the reliance on the axiom of choice is avoidable in that case. However, excluded middle is more critical, in particular to show that when the union of finitely many sub-trees is infinite, it must be because one of them is infinite. “Being infinite” is not a decidable property so the selection performed by excluded middle cannot be turned into a computable value.

Kleene [16] famously gave a counterexample to a computational interpretation of weak Kőnig’s lemma: he builds a computable infinite binary tree, so a decidable set of finite sequences of Booleans,222choices between the left or the right son. for which there exists no computable infinite branch, i.e. no infinite sequence of Booleans of which every finite prefix belongs to the tree. This gives a very strong argument against the constructive acceptability of Kőnig’s lemma, at least when one “interprets Bishop’s mathematics in a recursive way” [6].333as said earlier, the notion of what is constructively acceptable is not universally agreed on.

Not only Kőnig’s lemma could be rejected from a constructivist point of view, but some of its consequences suffer similar defects. Consider the compactness result for Wang tilings:

A finite set of tiles can tile the plane if and only if it can tile any finite square.

Similarly to Kleene’s result, Hanf [14] and Myers [24] famously gave examples of finite sets of tiles that can tile the whole plane, but only in a nonrecursive way. This invalidates a computational understanding of the compactness result. Hence no constructive account of the proof of the compactness result can be given, otherwise it would entail the existence of a recursive tiling.444Notice that the tileability of a finite square is a decidable property.

So there is no real hope at a drop-in constructive replacement for Kőnig’s lemma because some of its consequences might live outside the realm of constructive or computable mathematics. Nevertheless, we argue that it might be used in contexts where weaker alternatives would also fit. And it is our aim here to explore some of those alternatives.

For instance, there is an interpretation of its contrapositive form, i.e. “any finitely branching tree with only finite branches must be finite,” where the notion of infinity is replaced by finitary notions. Notice that the referred statement still relies on arbitrary (finite or infinite) trees: when saying “only finite branches,” one must consider the possibility that it contains infinite branches otherwise this hypothesis is vacuous:

  • one classical way to understand “only finite branches” is by saying that no infinite sequence can have all its finite prefixes in the tree. Hence even though the statement does not refer to infinity, it is uncovered in this unfolding;

  • another way is to understand “only finite branches” is to give an inductive characterization of the well-foundedness of branches with the single rule for the 𝚊𝚌𝚌F:𝚛𝚎𝚕1X predicate:

    where F:𝚛𝚎𝚕2X is a parameter relation. Intuitively, Fxy means that x is the father of y in the tree (or y is a son of x). If nodes are conflated with finite branches, then Fxy means that y has the shape x++[_], i.e. x followed by a single choice of a son.

In that later case, finiteness of the tree branching along F and rooted at 𝑟𝑜𝑜𝑡 can be defined by (𝚊𝚌𝚌F𝑟𝑜𝑜𝑡), and thus understood as the unavoidable termination of the nondeterministic process of expending branches by adding sons after sons, starting from the 𝑟𝑜𝑜𝑡. Intuitively, the proof of (𝚊𝚌𝚌F𝑟𝑜𝑜𝑡) is a well-founded tree where a leaf is decorated with a proof of (𝚊𝚌𝚌Fx) such that x is childless (i.e. y,¬Fxy). In that inductive understanding of “only finite branches,” the contrapositive of Kőnig’s lemma can be established by well founded induction, see e.g. [1, p. 15]. We will derive it as a corollary in Section 5.3.

In intuitionistic frameworks, Brouwer’s FAN theorem is a consequence of the Bar theorem, originally designed to grasp the full continuum in an approach to real analysis [5]. Its acceptability from a constructive standpoint is a delicate issue. It has a rich track record: see e.g. Troelstra [27, 28] for the context of intuitionistic analysis, but there are more recent results, related to convexity [4] or to the exhaustibility of the Cantor space [9]. Intuitionists have compared Kőnig’s lemma with the FAN theorem in various contexts, e.g. [12, 30].

Remember that our aim is not to study the FAN theorem per se, but to propose workable alternatives to the use of Kőnig’s lemma for the conversion of classical proofs to constructive ones. In this context, we may abuse referring to Kőnig’s lemma even though, from a purely intuitionistic standpoint, the results we discuss are closer to the FAN theorem.

However, in contrast with the above cited work on the FAN theorem, we differ in our approach to quantification over the branches of trees. We follow Coquand’s thesis [6] that bar inductive predicates are the correct expression of universal quantification over choice sequences, be they lawlike or lawless; see our discussion in Section 3.5. Hence, we work directly with inductive bars (on finite sequences), avoiding Brouwer’s thesis [29] completely. Actually, we use the more general notion of inductive cover [25] on (transition) relations.

As for our contributions, in Section 3 we show that the notion of inductive cover generalizes both inductive bars and (inductive) accessibility, w.r.t. its definition as well as w.r.t. the results that it entails. We then give a detailed comparison between the constructive and classical strength of three characterizations of covers: positive, negative and sequential. In particular, for the classical part of the comparison, we separate the role played by excluded middle and dependent choice and show the key role played by the intermediate negative characterization. It will also play an important role in a constructive context, as a substitute to the sequential characterization, when used in combination with the FAN theorem.

In Section 4, we give a type theoretic interpretation of the FAN theorem for inductive covers, with a concise proof. The central argument, the stability of upward closed inductive covers under binary union, differs from that of the proof of Fridlender’s FAN theorem for inductive bars [10] which relies on the stability of monotone inductive bars under binary intersection. However, we derive the FAN for bars as an instance of the FAN for covers, to make the generalization explicit.

In Section 5, we exploit the FAN for inductive covers, followed by an application of the negative characterization of covers, to give several weaker versions of (the contrapositive of) Kőnig’s lemma, showing how relations can be represented by rose trees (hence finitary). This includes an extra covering assumption, or an extra bar assumption, or else an extra almost fullness assumption.

In Section 6, we give two examples where Kőnig’s lemma can successfully be replaced with one of these weaker variants to give constructive accounts of results of which the former proofs were using the classical form of the lemma.

Additionally, we contribute a mechanization of all the results of the paper in a Coq script that can of course be type checked for correctness, but was especially designed to be read by humans, not only by computers. The script is mostly self contained, largely commented, with concise proofs: the longest is 25 loc but most of them are shorter than 10 loc. It is accessible under a free software license at

https://github.com/DmxLarchey/Constructive-Konig

2 Coq preliminaries

We denote by  the type of propositions and simply by 𝚃𝚢𝚙𝚎 the Coq hierarchy of types, as usual with this framework. We write : for the empty proposition and use the standard notations for logical connectives. Recall that the logic of Coq is intuitionistic hence the negation is defined by ¬P:=P. Following the BHK interpretation, XY more generally denotes the type of maps from X to Y, and we write x:X,Px for the dependent product, irrelevant of whether P:X or P:X𝚃𝚢𝚙𝚎. Whenever it can be guessed, the type annotation in x:X is simply avoided. The dependent sum has several flavors in Coq: for P:X we have the proposition x,Px: and the type {xPx}:𝚃𝚢𝚙𝚎 which behave somewhat similarly but are however fundamentally different because propositions of sort  cannot systematically be eliminated to build terms of sort 𝚃𝚢𝚙𝚎.

The type of Peano natural numbers is inductively defined in Coq as :n::=0𝚂n and arithmetic in Coq, which we assume, is built on this type. We manipulate finite sequences as lists, polymorphic555operators on lists are parametric in X and this first argument is nearly always left implicit. over the carrier type X, in the inductive type 𝚕𝚒𝚜𝚝X:l::=[]x::l where x:X. Additionally, list concatenation (resp. membership) is named 𝚊𝚙𝚙 (resp. 𝙸𝚗), denoted infix by ++:𝚕𝚒𝚜𝚝X𝚕𝚒𝚜𝚝X𝚕𝚒𝚜𝚝X (resp. :X𝚕𝚒𝚜𝚝X), and defined by a guarded fixpoint. Moreover, we use the reverse 𝚛𝚎𝚟:𝚕𝚒𝚜𝚝X𝚕𝚒𝚜𝚝X and the length :𝚕𝚒𝚜𝚝X functions as well as the permutation relation p:𝚕𝚒𝚜𝚝X𝚕𝚒𝚜𝚝X, as inductively defined in the 𝙿𝚎𝚛𝚖𝚞𝚝𝚊𝚝𝚒𝚘𝚗 module of the Coq standard library.

We define finiteness as a property 𝚏𝚒𝚗𝚒𝚝𝚎P: of unary relations (viewed as sets):666Like lists based results, 𝚏𝚒𝚗𝚒𝚝𝚎 is parametric in X and the braces around it specify an implicit argument.

𝚏𝚒𝚗𝚒𝚝𝚎{X}(P:X):=l,x,Pxxl

i.e. there exists a list spanning the relation P. This characterization of finiteness as listability is equivalent to Kuratowski finiteness but easier to manipulate formally.

We manipulate relations as functions outputting propositions, hence we denote by 𝚛𝚎𝚕2XY:=XY the type of heterogeneous binary relations between X and Y. In the homogeneous case, we simply write 𝚛𝚎𝚕2X:=XX, and 𝚛𝚎𝚕1X:=X in the unary case. We use the letters P,Q:𝚛𝚎𝚕1_ to denote unary relations and R,T:𝚛𝚎𝚕2__ to denote binary relations. We write PQ or RT for the inclusion between relations. Except for commonly found notations like , p or , we generally write related pairs with e.g. a letter for the relation name, in prefix order, like in Txy.

For complex inductive predicates, we rather present the constructors using rules with a horizontal line separating the premises from the conclusion. As an example, we below display those of 𝙵𝚘𝚛𝚊𝚕𝚕P:𝚛𝚎𝚕1(𝚕𝚒𝚜𝚝X) (denoted 1P) and 𝙵𝚘𝚛𝚊𝚕𝚕𝟸R:𝚛𝚎𝚕2(𝚕𝚒𝚜𝚝X)(𝚕𝚒𝚜𝚝Y) (denoted 2R) which are finitary conjunctions defined in the 𝙻𝚒𝚜𝚝 module of the standard library, for P:𝚛𝚎𝚕1X and R:𝚛𝚎𝚕2XY:

The free symbols x,y:X and l,m:𝚕𝚒𝚜𝚝X can be instantiated by any value in their respective types. In the corresponding Coq constructors, they are universally quantified over.

3 Inductive covers

We recall the notion of inductive cover [25] which subsumes both accessibility and bar inductive predicates; see Sections 3.2 and 3.3. We discuss three characterizations of covers, the positive, the negative and the sequential, from the strongest to the weakest (constructively), but also explain in some details how to get their classical equivalence, separating the roles played by the axioms of excluded middle and dependent choice. We discuss these characterizations in the context Brouwer’s intuitionistic understanding of infinite sequences.

Before we switch to covers, we import the standard order theoretic notion of being upward closed, however not requiring partial orders but any binary relation instead.

Definition 1 (Upward closed).

Given a type X and a binary relation T:𝚛𝚎𝚕2X, we say that a unary relation P:𝚛𝚎𝚕1X is T-upward closed if P is stable under direct T-images. We define: 𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍TP:=xy,TxyPxPy.

For instance, the finitary conjunction 1P is upward closed for permutations, formally stated as 𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍(p)1P. Upward closed unary relations will be preserved by covers, and some results about covers (including the FAN theorem) assume upward closed relations.

3.1 Inductive covers definition, basic results

As in [25], we work with the class of singleton inductively generated formal topologies, as opposed to the more general (e.g. indexed) presentation of [7]. They are defined by the notion of inductive cover of a set (i.e. unary relation) along a (transition) binary relation.

Definition 2 (Inductive cover [25]).

Given a type X, a binary relation T:𝚛𝚎𝚕2X and a unary relation P:𝚛𝚎𝚕1X, we define the inductive T-cover of P, denoted 𝚌𝚘𝚟𝚎𝚛TP:𝚛𝚎𝚕1X by the two following inductive rules:

Notice that Px (resp. Txy and 𝚌𝚘𝚟𝚎𝚛TPx) is denoted by xP (resp. yT(x) and xP) in [25] but we favor prefix notations. Remark that the transition relation T is hidden in the infix notation xP used for the cover whereas we keep it in 𝚌𝚘𝚟𝚎𝚛TPx. Also in [25], the constructor [𝚌𝚘𝚟𝚎𝚛_𝚜𝚝𝚘𝚙] (resp. [𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚡𝚝]) is called reflexivity (resp. infinity).

The non-dependent induction principle (or eliminator, depending on your preferred terminology) generated for the 𝚌𝚘𝚟𝚎𝚛TP predicate has the following type:

𝚌𝚘𝚟𝚎𝚛_𝚒𝚗𝚍TP:Q,PQ(x,TxQQx)(x,𝚌𝚘𝚟𝚎𝚛TPxQx).

Informally, it states that 𝚌𝚘𝚟𝚎𝚛TP is included in any unary relation Q closed under the constructors/rules [𝚌𝚘𝚟𝚎𝚛_𝚜𝚝𝚘𝚙] and [𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚡𝚝]. Coq auto-generates a slight variant777namely of type Q,PQ(x,Tx𝚌𝚘𝚟𝚎𝚛TPTxQQx)(x,𝚌𝚘𝚟𝚎𝚛TPxQx). of 𝚌𝚘𝚟𝚎𝚛_𝚒𝚗𝚍 but they are equivalent as non-dependent eliminators. We choose to present the above one because of its direct link with the positive, negative and sequential characterizations of the cover that we discuss in Section 3.4. In our Coq code, we give a straightforward implementation of 𝚌𝚘𝚟𝚎𝚛_𝚒𝚗𝚍 as a guarded 𝙵𝚒𝚡𝚙𝚘𝚒𝚗𝚝, similar to the auto-generated one.

Using the 𝚌𝚘𝚟𝚎𝚛_𝚒𝚗𝚍 induction principle in combination with the constructors, we show how a morphism can be used to transfer covers between different types and relations.

Proposition 3 (𝚌𝚘𝚟𝚎𝚛_𝚖𝚘𝚛𝚙𝚑𝚒𝚜𝚖).

Let X,Y be two types, R:𝚛𝚎𝚕2X and T:𝚛𝚎𝚕2Y be binary relations, and P:𝚛𝚎𝚕1X and Q:𝚛𝚎𝚕1Y be unary relations. We further assume a map f:YX which is supposed to be a morphism w.r.t. P/Q and R/T, i.e. satisfying

y,P(fy)Qyandy1y2,Ty1y2R(fy1)(fy2).

Then we have xy,x=fy𝚌𝚘𝚟𝚎𝚛RPx𝚌𝚘𝚟𝚎𝚛TQy.

As they are made available as Coq code, we generally do not give detailed proofs herein. To illustrate how we reason by induction using 𝚌𝚘𝚟𝚎𝚛_𝚒𝚗𝚍, we exceptionally give a detailed account of the proof for the 𝚌𝚘𝚟𝚎𝚛_𝚖𝚘𝚛𝚙𝚑𝚒𝚜𝚖 statement.

Proof.

We first reorder the hypotheses and the goal becomes x,𝚌𝚘𝚟𝚎𝚛RPxy,x=fy𝚌𝚘𝚟𝚎𝚛TQy, which we prove by induction on 𝚌𝚘𝚟𝚎𝚛RPx: we factor out Q in the goal as x,𝚌𝚘𝚟𝚎𝚛RPxQx with Q:=λx,y,x=fy𝚌𝚘𝚟𝚎𝚛TQy. Reasoning backwards, we apply the instance 𝚌𝚘𝚟𝚎𝚛_𝚒𝚗𝚍RPQ to the goal, replacing it with two sub-goals:888factoring out Q and applying 𝚌𝚘𝚟𝚎𝚛_𝚒𝚗𝚍 are automated for us by the Coq 𝚒𝚗𝚍𝚞𝚌𝚝𝚒𝚘𝚗 tactic.

  • PQ: unfolding Q, we assume x s.t. Px and y s.t. x=fy and we have to show 𝚌𝚘𝚟𝚎𝚛TQy. We derive P(fy) by substitution and then Qy using the left morphism hypothesis. We then derive 𝚌𝚘𝚟𝚎𝚛TQy using the constructor [𝚌𝚘𝚟𝚎𝚛_𝚜𝚝𝚘𝚙];

  • x,(RxQ)Qx: we assume x s.t. 𝐼𝐻x:z,Rxzy,z=fy𝚌𝚘𝚟𝚎𝚛TQy (corresponding to the induction hypothesis) and y s.t. x=fy, and we have to show 𝚌𝚘𝚟𝚎𝚛TQy. We substitute x with fy in 𝐼𝐻x and get 𝐼𝐻y:z,R(fy)zy,z=fy𝚌𝚘𝚟𝚎𝚛TQy. Applying the second constructor [𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚡𝚝], we replace the goal 𝚌𝚘𝚟𝚎𝚛TQy with z,Tyz𝚌𝚘𝚟𝚎𝚛TQz. Hence we assume z s.t. Hyz:Tyz and we now have to show 𝚌𝚘𝚟𝚎𝚛TQz. Using the right morphism hypothesis, we derive Hyz:R(fy)(fz). We instantiate the induction hypothesis as 𝐼𝐻y(fz)Hyzz𝚎𝚚_𝚛𝚎𝚏𝚕 and get 𝚌𝚘𝚟𝚎𝚛TQz as desired. Notice that we use the reflexive identity for 𝚎𝚚_𝚛𝚎𝚏𝚕:fz=fz.

This concludes the proof. Using standard automation for backward proof-search (the 𝚎𝚊𝚞𝚝𝚘 tactic), the Coq proof script however consists in only two lines of code, one for reordering the hypotheses in the initial statement, the second telling which hypothesis to perform induction on, and then launching automation after substituting fy for x.

For the rest of the section, we assume a fixed type X to be used as carrier for binary relations R,T:𝚛𝚎𝚕2X and unary relations P,Q:𝚛𝚎𝚕1X. The monotonicity of 𝚌𝚘𝚟𝚎𝚛 can be obtained as a particular case, using the identity morphism f:=λx,x. More precisely, 𝚌𝚘𝚟𝚎𝚛()() is antitonic in its first argument and monotonic in its second argument:

𝚌𝚘𝚟𝚎𝚛_𝚖𝚘𝚗𝚘RTPQ:TRPQ𝚌𝚘𝚟𝚎𝚛RP𝚌𝚘𝚟𝚎𝚛TQ.

Additionally to be increasing (by [𝚌𝚘𝚟𝚎𝚛_𝚜𝚝𝚘𝚙]) and monotonic (by 𝚌𝚘𝚟𝚎𝚛_𝚖𝚘𝚗𝚘), 𝚌𝚘𝚟𝚎𝚛T is also an idempotent operator making it a closure operator:

𝚌𝚘𝚟𝚎𝚛_𝚒𝚍𝚎𝚖𝚙𝚘𝚝𝚎𝚗𝚝TP:𝚌𝚘𝚟𝚎𝚛T(𝚌𝚘𝚟𝚎𝚛TP)𝚌𝚘𝚟𝚎𝚛TP.

Proof.

Assuming an arbitrary x, the proof of 𝚌𝚘𝚟𝚎𝚛T(𝚌𝚘𝚟𝚎𝚛TP)x𝚌𝚘𝚟𝚎𝚛TPx proceeds by induction on 𝚌𝚘𝚟𝚎𝚛T(𝚌𝚘𝚟𝚎𝚛TP)x. Then we get that the 𝚌𝚘𝚟𝚎𝚛T operator preserves T-upward closed unary relations:

𝚌𝚘𝚟𝚎𝚛_𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍TP:𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍TP𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍T(𝚌𝚘𝚟𝚎𝚛TP).

Proof.

We assume 𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍TP and an arbitrary x and show 𝚌𝚘𝚟𝚎𝚛TPxy,Txy𝚌𝚘𝚟𝚎𝚛TPy by induction on 𝚌𝚘𝚟𝚎𝚛TPx.

3.2 Inductive cover and accessibility

In this section, we fix a type X to serve as carrier for relations below. We recall that the 𝚌𝚘𝚟𝚎𝚛 predicate is a generalization of the accessibility predicate, also called R-founded in [25].

Definition 4 (𝚊𝚌𝚌(essibility), R-founded).

Given a binary relation R:𝚛𝚎𝚕2X, the 𝚊𝚌𝚌(essibility) predicate999The variant 𝙰𝚌𝚌 as defined in the Coq standard library module 𝙿𝚛𝚎𝚕𝚞𝚍𝚎, simply uses the reversed relation R1 instead of R for 𝚊𝚌𝚌. So we have 𝙰𝚌𝚌R𝚊𝚌𝚌R1 and 𝙰𝚌𝚌R1𝚊𝚌𝚌R. for R and the R-founded predicate101010R-founded is defined in [25, Definition 3.1]. are defined inductively, each with one single rule:

A simple observation shows that the shape of the constructor [𝚊𝚌𝚌_𝚒𝚗𝚝𝚛𝚘] is the same as the second constructor [𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚡𝚝] of the 𝚌𝚘𝚟𝚎𝚛 predicate. Furthermore, the first constructor [𝚌𝚘𝚟𝚎𝚛_𝚜𝚝𝚘𝚙] can be neutralized by setting P as the empty relation :=λ_,. Hence we immediately derive the equivalence:

Proposition 5.

The 𝚊𝚌𝚌(essibility) predicate is an instance of the 𝚌𝚘𝚟𝚎𝚛 predicate.

𝚊𝚌𝚌_𝚒𝚏𝚏_𝚌𝚘𝚟𝚎𝚛_𝚎𝚖𝚙𝚝𝚢Rx:𝚊𝚌𝚌Rx𝚌𝚘𝚟𝚎𝚛Rx.

Moreover, accessible elements are necessarily irreflexive. Indeed, we show x,𝚊𝚌𝚌RxRxx by induction on 𝚊𝚌𝚌Rx. Hence it follows that the left premise ¬Rxx of the constructor of R-founded is superfluous:

Proposition 6.

R-founded and accessibility define equivalent notions:

𝚏𝚘𝚞𝚗𝚍𝚎𝚍_𝚒𝚏𝚏_𝚊𝚌𝚌Rx:𝚏𝚘𝚞𝚗𝚍𝚎𝚍Rx𝚊𝚌𝚌Rx.

As a corollary we get 𝚏𝚘𝚞𝚗𝚍𝚎𝚍Rx𝚌𝚘𝚟𝚎𝚛Rx, a result already established in [25, Theorem 3.2] but, seemingly, the authors did not observe that the left premise (¬Rxx i.e. irreflexivity) of the introduction rule for R-founded was superfluous.

3.3 Inductive cover and inductive bars

Let X be a carrier type for lists. We consider unary relations on the type 𝚕𝚒𝚜𝚝X that we use to represent finite sequences. We show that inductive covers, in addition to generalizing accessibility predicates (see Section 3.2), also generalize inductive bar predicates [6, 10].

Definition 7 (Inductive bar).

Let P:𝚛𝚎𝚕1(𝚕𝚒𝚜𝚝X) be a unary relation on lists. We define the inductive 𝚋𝚊𝚛P:𝚛𝚎𝚕1(𝚕𝚒𝚜𝚝X) unary relation with the two following inductive rules:

Compared to [10, Definition 6], there are two slight differences. First our lists expand from the left, whereas often in the literature [6, 10, 29], finite sequences expand from the right. Hence rule [𝚋𝚊𝚛_𝚗𝚎𝚡𝚝] would be written

with such a reversed convention. However, this difference can be viewed as just of matter of ordering the display of the arguments of the list constructor ::. Another more important difference compared to [10, Definition 6] or else [29], is the absence of the inductive rule

in Definition 7. We discard rule [𝚋𝚊𝚛_𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎] because it is admissible for monotone unary relations on finite sequences.

Definition 8 (Monotone unary relation).

A unary relation P:𝚛𝚎𝚕1(𝚕𝚒𝚜𝚝X) is monotone if it satisfies 𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎P:=xl,PlP(x::l).

The (discarded) [𝚋𝚊𝚛_𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎] rule/constructor would ensure that 𝚋𝚊𝚛P is a monotone predicate even when P is not monotone. However, as an instance of 𝚌𝚘𝚟𝚎𝚛_𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍, if P is monotone then so is 𝚋𝚊𝚛P; see 𝚋𝚊𝚛_𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎 after Proposition 10 below. We observe that monotone unary relations are those which are upward closed under list extension:

Definition 9 (list extension).

The 𝚎𝚡𝚝𝚎𝚗𝚍𝚜:𝚛𝚎𝚕2(𝚕𝚒𝚜𝚝X) binary relation on lists is defined by the single inductive rule:

We could have used the first order characterization 𝚎𝚡𝚝𝚎𝚗𝚍𝚜lmx,m=x::l to give an alternate definition of 𝚎𝚡𝚝𝚎𝚗𝚍𝚜. With this notion, we get the equivalence

𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍_𝚎𝚡𝚝𝚎𝚗𝚍𝚜_𝚒𝚏𝚏_𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎P:𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍𝚎𝚡𝚝𝚎𝚗𝚍𝚜P𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎P

as an immediate consequence, but the specialization goes further:

Proposition 10 (𝚋𝚊𝚛_𝚒𝚏𝚏_𝚌𝚘𝚟𝚎𝚛_𝚎𝚡𝚝𝚎𝚗𝚍𝚜).

Given a unary relation P:𝚛𝚎𝚕1(𝚕𝚒𝚜𝚝X) and a list l:𝚕𝚒𝚜𝚝X, we have the equivalence 𝚋𝚊𝚛Pl𝚌𝚘𝚟𝚎𝚛𝚎𝚡𝚝𝚎𝚗𝚍𝚜Pl.

Thanks to Proposition 10 and 𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍_𝚎𝚡𝚝𝚎𝚗𝚍𝚜_𝚒𝚏𝚏_𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎, the two below results are specializations of respectively 𝚌𝚘𝚟𝚎𝚛_𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍 and 𝚌𝚘𝚟𝚎𝚛_𝚖𝚘𝚗𝚘.

𝚋𝚊𝚛_𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎P:𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎P𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎(𝚋𝚊𝚛P);𝚋𝚊𝚛_𝚖𝚘𝚗𝚘PQ:PQ𝚋𝚊𝚛P𝚋𝚊𝚛Q.

More generally, the analysis that we are going to present for inductive covers in the next section can be specialized to either accessibility predicates and inductive bar predicates.

3.4 Positive, negative and sequential characterizations

We now discuss other characterizations of covers, which are not constructively equivalent to the inductive one, but however are classically equivalent, hence the abusive use of the word “characterization.” We present a detailed analysis of those characterizations and which classical axioms their equivalence depends on.

The results of this section that assume classical axioms are not used elsewhere in this paper: these axioms are (propositional) excluded middle (XM), giving us De Morgan laws for logical connectives and quantifiers, and dependent choice (DC):

𝚡𝚖:A:,A¬A;𝚍𝚌:(A:𝚃𝚢𝚙𝚎)(R:𝚛𝚎𝚕2A),(ab,Rab)aρ:A,ρ0=an,Rρnρ1+n.

The names of the results that depend on these added axioms are suffixed with _𝚇𝙼 or _𝙳𝙲 or both for an unambiguous exposition.

We start with the following definitions of the positive characterization 𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜, the negative characterization 𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐, and the sequential characterization 𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚.

Definition 11 (Nonequivalent characterizations of cover).
𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜TPx:=λQ:𝚛𝚎𝚕1X,PQ(y,TyQQy)Qx;𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐TPx:=λQ:𝚛𝚎𝚕1X,Qx(y,Qyz,QzTyz)y,PyQy;𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚TPx:=λρ:X,ρ0=x(n,Tρnρ1+n)n,Pρn.

Although not equivalent, the constructive strength of these characterizations can be compared: they are displayed from the strongest (𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜) to the weakest (𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚). Beware that both Q and ρ are universally quantified over in the characterizations below.

The positive characterization 𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜 is really just a reordering of the implications in the induction principle 𝚌𝚘𝚟𝚎𝚛_𝚒𝚗𝚍, so we get the following equivalence purely constructively:

𝚌𝚘𝚟𝚎𝚛_𝚒𝚏𝚏_𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜TPx:𝚌𝚘𝚟𝚎𝚛TPxQ,𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜TPxQ.

The positive characterization is constructively stronger that the negative one:

𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜__𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐TPx:(Q,𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜TPxQ)(Q,𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐TPxQ).

Proof.

We use Q,𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜TPxQ as the formulation of an induction principle. The negative characterization is constructively stronger than the sequential one. The below proof argument anticipates the intuition behind the definition of the negative characterization.

𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐__𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚TPx:(Q,𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐TPxQ)(ρ,𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚TPxρ).

Proof.

Assuming a T-sequence ρ:X, we instantiate Q with the direct image ρ():=λy,n,ρn=y. We show 𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐TPxρ()𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚TPxρ and conclude.

We now explain the intuition behind those definitions by turning to a classical interpretation where all those characterizations are equivalent, discussing the precise roles played by XM and DC. The negative characterization 𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐 is central to our analysis and can be understood in two ways, either as deriving from 𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜 or generalizing 𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚:

  • The first understanding of 𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐 is as contrapositive form of 𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜:

    𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜_𝚒𝚏𝚏_𝚗𝚎𝚐_𝚇𝙼TPxQ:𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜TPxQ𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐TPx(¬Q).

    The proof involves excluded middle but first-order De Morgan transformations are enough to get the equivalence.111111In the Coq script, we insist on obtaining that equivalence via De Morgan rewriting and congruence only. The converse implication of 𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜__𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐 above is unlikely to be constructively provable (see Section 3.5), but it is a direct corollary to 𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜_𝚒𝚏𝚏_𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐_𝚇𝙼,121212see 𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐__𝚌𝚘𝚟𝚎𝚛_𝚙𝚘𝚜_𝚇𝙼. however assuming XM as an added axiom;

  • The second way to understand the negative characterization 𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐 is to view it as a generalization of the sequential characterization 𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚. Notice that the statement ρ,𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚TPxρ is the usual intuitive definition of being a T-cover for P:

    Any infinite T-sequence starting at x meets P.131313Such formulation are more commonly found for the “intuitive” (read sequential) definition of “being a bar for P” [6]. See 𝚋𝚊𝚛_𝚜𝚎𝚚𝚞𝚎𝚗𝚌𝚎𝚜 in Section 3.5 for the corresponding specialization.

    However this interpretation depends on what are the inhabitants of the type X of which ρ is a member; see Section 3.5. In the proof of 𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐__𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚, we used the direct image ρ() as a particular instance of Q in 𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐. Q represents a set of values containing x and over which T is a total binary relation, which generalizes T-sequences by removing the requirement of determinism. The quantification over T-sequences ρ:X is replaced by quantification over Q which is an T-unstoppable nondeterministic process: indeed any point in Q has at least one T-image in Q. This property of unstoppability y,Qyz,QzTyz is shared also by Brouwer’s notion of spread.

As a consequence of the above discussion, constructively already, the positive characterization is equivalent to the inductive one, and stronger than the negative one, which is itself stronger than the sequential one. Hence we derive:

𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐𝚊𝚝𝚒𝚟𝚎TPx:𝚌𝚘𝚟𝚎𝚛TPxQ,Qx(y,Qyz,QzTyz)y,PyQy𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚𝚞𝚎𝚗𝚌𝚎𝚜TPx:𝚌𝚘𝚟𝚎𝚛TPxρ,ρ0=x(n,Tρnρ1+n)n,Pρn

If one is interested in the converse implications, then, on the one hand, XM would be used to prove that Q,𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐TPxQ implies 𝚌𝚘𝚟𝚎𝚛TPx. On the other hand, to recover Q,𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐TPxQ from ρ,𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚TPxρ, one uses 𝙳𝙲{xQx} which is dependent choice specialized on the Σ-type {xQx} where Q:𝚛𝚎𝚕1X. Indeed, the statement of 𝙳𝙲X, i.e. dependent choice specialized on type X is:

𝙳𝙲X:=R:𝚛𝚎𝚕2X,(xy,Rxy)xρ:X,ρ0=xn,Rρnρ1+n.

When Q:𝚛𝚎𝚕1X, we reformulate the instance 𝙳𝙲{xQx} as141414see 𝙳𝙲_𝚜𝚒𝚐__𝙳𝙲_Σ in the Coq code.

R,(x,Qxy,QyRxy)x,Qxρ,ρ0=xn,QρnRρnρ1+n

which is exactly what is needed to extract a sequence ρ:X out of the T-unstoppable process Q starting at x.

𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚__𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐_𝙳𝙲TPx:(ρ,𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚TPxρ)(Q,𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐TPxQ).
Theorem 12 (in the spirit of Brouwer’s bar theorem).

Assuming 𝚡𝚖 and 𝚍𝚌, the inductive and the sequential characterizations of covering are equivalent:

𝚌𝚘𝚟𝚎𝚛TPxρ,ρ0=x(n,Tρnρ1+n)n,Pρn.

Hence under XM+DC, any cover is an inductive cover while Brouwer’s “bar theorem” states that “any bar is inductive bar,” or, quoting [6], for sequences of natural numbers:

P:𝚛𝚎𝚕1(𝚕𝚒𝚜𝚝),𝚋𝚊𝚛P[]α:,n,P[αn1;;α0].

The bar theorem statement is an instance of Theorem 12 where T:=𝚎𝚡𝚝𝚎𝚗𝚍𝚜. Indeed, an 𝚎𝚡𝚝𝚎𝚗𝚍𝚜-sequence of lists in 𝚕𝚒𝚜𝚝X corresponds to the n-prefixes of a sequence X; see 𝙱𝚛𝚘𝚞𝚠𝚎𝚛_𝚋𝚊𝚛_𝚇𝙼_𝙳𝙲 in the Coq code.

3.5 Discussion

We have explained how the inductive predicates 𝚋𝚊𝚛 and 𝚊𝚌𝚌 are just specializations of the notion of inductive 𝚌𝚘𝚟𝚎𝚛 so the remarks below also apply to those restricted notions. For instance we get the following specializations for R:𝚛𝚎𝚕2X and P:𝚛𝚎𝚕1(𝚕𝚒𝚜𝚝X):

𝚊𝚌𝚌_𝚗𝚎𝚐𝚊𝚝𝚒𝚟𝚎x:𝚊𝚌𝚌RxQ,Qx(y,Qyz,QzRyz);𝚊𝚌𝚌_𝚜𝚎𝚚𝚞𝚎𝚗𝚌𝚎𝚜x:𝚊𝚌𝚌Rxρ,ρ0=x(n,Rρnρ1+n);𝚋𝚊𝚛_𝚗𝚎𝚐𝚊𝚝𝚒𝚟𝚎:𝚋𝚊𝚛P[]Q,Q[](l,Qlx,Q(x::l))l,PlQl;𝚋𝚊𝚛_𝚜𝚎𝚚𝚞𝚎𝚗𝚌𝚎𝚜:𝚋𝚊𝚛P[]α,n,P[αn1;;α0].

The negative characterization is intermediate between the inductive/positive characterization (strongest) and the sequential characterization (weakest). We isolate the role played by XM (in fact De Morgan laws) and DC. While it avoids DC, the negative characterization, using unstoppable nondeterministic processes instead of sequences, still likely requires XM to be equivalent with the positive characterization. Indeed, were the negative characterization be constructively equivalent to positive/inductive characterization, such a result would instantly give us Theorem 12 (and Brouwer’s bar theorem) using DC alone, hence avoiding XM.

The discussion on what is nature of (infinite) sequences is central to the sequential characterization of bars, and of course, as the infinite itself, is very much debated in constructive mathematics. Clearly, adjoining XM and DC populates the type X with enough lawless sequences. Brouwer however rejected XM and DC and instead justifies his bar theorem using “Brouwer’s thesis” [29] which is not as strong as an axiom as XM+DC. In [6], Coquand criticizes the use of the type X to cover “all” sequences in the sequential characterization of bars:

“This example is paradigmatic: by replacing systematically the intuitive notion of bar by the notion of inductive bar, we can now prove Brouwer’s fan theorem. More generally, we can think of 𝚋𝚊𝚛P[] as the correct format expression of a universal quantification over all sequences, not necessarily given by a law.” (emphasis added)

To be more specific, absent of extra axioms, the type X of lawlike sequence (on which the sequential characterization is based) cannot account for sequences that do not evolve according to a predetermined law, see e.g. Veldman [29]:

“the intuitionistic mathematician […] admits the possibility of sequences α0,α1,α2, that are created step-by-step and thus, in some sense, are given by a black box. He is very much aware that he is unable to make any kind of survey of the totality of all infinite sequences of natural numbers.” (emphasis added)

In a way, we follow and extend to covers the program proposed by Coquand [6] to systematically replace the intuitive (understand sequential) notion of cover by the inductive version, avoiding axioms altogether. But we can still use the sequential or negative versions, in a limited way, at the end of a constructive deduction, e.g. following the FAN theorem.

4 The FAN theorem for inductive covers

In this section, we present another interpretation of the FAN theorem in type theory, generalizing the FAN theorem for inductive bars [10] to inductive covers [7, 25] instead. We give a concise proof for this result, which differs significantly from that of [10, Theorem 6]. Hence, as an specialization, we get an alternate proof of that former result as well.

In this section, let us fix a type X and a binary relation T:𝚛𝚎𝚕2X. We extend the binary relation T to lists (viewed as finite sets), as T:𝚛𝚎𝚕2(𝚕𝚒𝚜𝚝X) using the direct image and this way, we can view FANs over T as T-sequences over finite sets.

4.1 Lifting a relation to finite sets

We define the finitary image relation on 𝚕𝚒𝚜𝚝X viewed as finite sets, i.e. permutations and contractions are admissible for lists used in that context.

Definition 13 (Finitary image).

We define the finitary image binary relation on lists, denoted T:𝚛𝚎𝚕2(𝚕𝚒𝚜𝚝X), by T:=λlm,y,ymx,xlTxy, i.e. Tlm holds when m is included in the direct image of l.

The finitary image relation T is monotonic in its first argument and antitonic in its second argument, i.e. l1l2m2m1Tl1m1Tl2m2 holds.

One critical observation for the proof of the FAN theorem below is how T behaves when splitting its first/source argument in two halves. Then there is a corresponding splitting of the second/image argument, but since T ignores the order on the elements of lists, this splitting only holds up to a permutation of the image list:

𝚏𝚒𝚖𝚊𝚐𝚎_𝚜𝚙𝚕𝚒𝚝_𝚒𝚗𝚟l1l2m:T(l1++l2)mm1m2,mpm1++m2Tl1m1Tl2m2

which we show by induction on m. Additionally, we show that T()k is upward closed for permutations for any k, which can be written as 𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍(p)(Tk). And to conclude this section, if P is upward closed for T then the finitary conjunction 1P of P (over lists) is upward closed for T, i.e. 𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍TP𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍T1P.

4.2 Proof of the FAN theorem for inductive covers

We give a proof of the statement of the FAN theorem for inductive covers, using the finitary image relation T to represent FANs over the relation T.

Theorem 14 (FAN for inductive covers).

Let P:𝚛𝚎𝚕1X be T-upward closed. If x is in the T-cover of P then the singleton list [x] is in the T-cover of 1P, i.e.

𝙵𝙰𝙽_𝚌𝚘𝚟𝚎𝚛:𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍TPx,𝚌𝚘𝚟𝚎𝚛TPx𝚌𝚘𝚟𝚎𝚛T1P[x].

Using a sequential understanding of covers, the statement could be read as: if any T-sequence starting at x meets P then any T-sequence starting at [x] meets 1P, hence “any finitary FAN rooted at x meets a monotone P uniformly,” which is a commonly found informal statement of the FAN theorem.

While this sequential understanding cannot be established in our constructive framework (for reasons discussed in Section 3.5), we below give a quite compact inductive proof of the positive/inductive understanding of the statement of the FAN theorem for inductive covers.

Proof.

Let us assume P with 𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍TP. We first show that 𝚌𝚘𝚟𝚎𝚛T1P is upward closed for permutations, stated as 𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍(p)(𝚌𝚘𝚟𝚎𝚛T1P). For this, we prove 𝚌𝚘𝚟𝚎𝚛T1Plm,lpm𝚌𝚘𝚟𝚎𝚛T1Pm by induction on 𝚌𝚘𝚟𝚎𝚛T1Pl.

Now, we establish the key result that 𝚌𝚘𝚟𝚎𝚛T1P is stable under (binary) union, herein represented by the append operation on lists:

𝚌𝚘𝚟𝚎𝚛_𝚏𝚒𝚖𝚊𝚐𝚎_𝚞𝚗𝚒𝚘𝚗lm:𝚌𝚘𝚟𝚎𝚛T1Pl𝚌𝚘𝚟𝚎𝚛T1Pm𝚌𝚘𝚟𝚎𝚛T1P(l++m).

The proof proceeds by nested induction, first on 𝚌𝚘𝚟𝚎𝚛T1Pl and then on 𝚌𝚘𝚟𝚎𝚛T1Pm, with a critical use of 𝚏𝚒𝚖𝚊𝚐𝚎_𝚜𝚙𝚕𝚒𝚝_𝚒𝚗𝚟 to invert two statements of shape T(++)() where the first argument of T is a union of lists. As a corollary of 𝚌𝚘𝚟𝚎𝚛_𝚏𝚒𝚖𝚊𝚐𝚎_𝚞𝚗𝚒𝚘𝚗, we get the specialization where l:=[x] is a singleton as

xm,𝚌𝚘𝚟𝚎𝚛T1P[x]𝚌𝚘𝚟𝚎𝚛T1Pm𝚌𝚘𝚟𝚎𝚛T1P(x::m)

and then, as a direct consequence

𝚌𝚘𝚟𝚎𝚛_𝚏𝚒𝚖𝚊𝚐𝚎_𝙵𝚘𝚛𝚊𝚕𝚕l:(x,xl𝚌𝚘𝚟𝚎𝚛T1P[x])𝚌𝚘𝚟𝚎𝚛T1Pl

for which we proceed by induction on l.

We can conclude with the proof of the FAN theorem for inductive covers. We establish 𝚌𝚘𝚟𝚎𝚛T1P[x], reasoning by induction on 𝚌𝚘𝚟𝚎𝚛TPx:

  • the base case where Px holds is trivially solved by giving a proof of 1P[x] and then deriving 𝚌𝚘𝚟𝚎𝚛T1P[x] with an instance of first constructor [𝚌𝚘𝚟𝚎𝚛_𝚜𝚝𝚘𝚙];

  • in the recursive case where y,Txy𝚌𝚘𝚟𝚎𝚛T1P[y] is the induction hypothesis, we show l,T[x]ly,yl𝚌𝚘𝚟𝚎𝚛T1P[y] and then combine this with 𝚌𝚘𝚟𝚎𝚛_𝚏𝚒𝚖𝚊𝚐𝚎_𝙵𝚘𝚛𝚊𝚕𝚕 and an instance of the second constructor [𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚡𝚝].

This concludes our proof of the FAN theorem for inductive covers.

We can immediately derive 1(𝚌𝚘𝚟𝚎𝚛TP)l𝚌𝚘𝚟𝚎𝚛T1Pl by induction on l and then the following characterization of covering for the finitary image:

𝚌𝚘𝚟𝚎𝚛_𝚏𝚒𝚖𝚊𝚐𝚎_𝚒𝚏𝚏:𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍TPl,𝚌𝚘𝚟𝚎𝚛T1Pl(x,xl𝚌𝚘𝚟𝚎𝚛TPx).

i.e. the list l is T-covered for 1P if and only if all the members of l are T-covered for P.

4.3 The FAN theorem for inductive bars

We recall the interpretation of the FAN theorem in type theory [10] and derive an alternate proof of that result as an instance of Theorem 14, which illustrates our claim of generalization. We fix a carrier type X for lists and consider relations over 𝚕𝚒𝚜𝚝X and 𝚕𝚒𝚜𝚝(𝚕𝚒𝚜𝚝X). For lc:𝚕𝚒𝚜𝚝(𝚕𝚒𝚜𝚝X), let us first define the

𝙵𝙰𝙽lc:=λl,2()llc

i.e. if written as l=[x1;;xn] and lc=[c1;;cp], 𝙵𝙰𝙽lcl means n=p and x1c1,x2c2,,xncn. Stated in plain english, l is a list of one-to-one choices for the choice list lc; see the inductive definition of 2R in Section 2. Using generic tools designed for the 𝚏𝚒𝚗𝚒𝚝𝚎 abstraction, we can show that 𝙵𝙰𝙽lc is a finite, i.e.

𝙵𝙰𝙽_𝚏𝚒𝚗𝚒𝚝𝚎lc:𝚏𝚒𝚗𝚒𝚝𝚎(𝙵𝙰𝙽lc).

However in [10, page 102], the author gives a specific construction of a list which collects the lists of choices l s.t. 𝙵𝙰𝙽lcl, that we denote 𝚕𝚒𝚜𝚝_𝚏𝚊𝚗lc herein, satisfying:

𝚕𝚒𝚜𝚝_𝚏𝚊𝚗_𝚜𝚙𝚎𝚌lc:l,𝙵𝙰𝙽lcll𝚕𝚒𝚜𝚝_𝚏𝚊𝚗lc.

Thus the dependent pair (𝚕𝚒𝚜𝚝_𝚏𝚊𝚗lc,𝚕𝚒𝚜𝚝_𝚏𝚊𝚗_𝚜𝚙𝚎𝚌lc) is an (explicitly given) proof of the proposition 𝚏𝚒𝚗𝚒𝚝𝚎(𝙵𝙰𝙽lc). The value of 𝚕𝚒𝚜𝚝_𝚏𝚊𝚗lc can be viewed as a generalization of the exponential function to lists, computing the list of choice sequences for lc.

The FAN theorem as stated and proved in [10] relies on the particular implementation of the exponential 𝚕𝚒𝚜𝚝_𝚏𝚊𝚗 given there, but the result itself only depends on the fact that 𝚕𝚒𝚜𝚝_𝚏𝚊𝚗 satisfies 𝚕𝚒𝚜𝚝_𝚏𝚊𝚗_𝚜𝚙𝚎𝚌. Theorem 6 of [10] also assumes the added rule [𝚋𝚊𝚛_𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎] in the inductive definition of the 𝚋𝚊𝚛 predicate but it is admissible for monotone relations.

Theorem 15 (reminder of Theorem 6 of [10]).

Let P:𝚛𝚎𝚕1(𝚕𝚒𝚜𝚝X) be unary relation. The following statement holds: 𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎P𝚋𝚊𝚛P[]𝚋𝚊𝚛(λlc,1P(𝚕𝚒𝚜𝚝_𝚏𝚊𝚗lc))[].

Proof.

We first reformulate the result as

𝙵𝙰𝙽_𝚋𝚊𝚛P:𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎P𝚋𝚊𝚛P[]𝚋𝚊𝚛(λlc,𝙵𝙰𝙽lcP)[]

which is an equivalent statement thanks to the monotonicity 𝚋𝚊𝚛_𝚖𝚘𝚗𝚘 of the 𝚋𝚊𝚛 predicate. Indeed, using 𝚕𝚒𝚜𝚝_𝚏𝚊𝚗_𝚜𝚙𝚎𝚌, we get the equivalence 1P(𝚕𝚒𝚜𝚝_𝚏𝚊𝚗lc)𝙵𝙰𝙽lcP for any lc. Now the statement 𝙵𝙰𝙽_𝚋𝚊𝚛P is independent of the implementation of 𝚕𝚒𝚜𝚝_𝚏𝚊𝚗.

Using the results of Section 3.3, we replace the hypotheses 𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎P and 𝚋𝚊𝚛P[] by 𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍𝚎𝚡𝚝𝚎𝚗𝚍𝚜P and 𝚌𝚘𝚟𝚎𝚛𝚎𝚡𝚝𝚎𝚗𝚍𝚜P[], and the goal 𝚋𝚊𝚛(λlc,𝙵𝙰𝙽lcP)[] becomes 𝚌𝚘𝚟𝚎𝚛𝚎𝚡𝚝𝚎𝚗𝚍𝚜(λlc,𝙵𝙰𝙽lcP)[]. Hence, by Theorem 14 we get 𝚌𝚘𝚟𝚎𝚛𝚎𝚡𝚝𝚎𝚗𝚍𝚜1P[[]]. Then we transfer the inductive cover using 𝚕𝚒𝚜𝚝_𝚏𝚊𝚗 as a morphism (Proposition 3):

𝚌𝚘𝚟𝚎𝚛𝚎𝚡𝚝𝚎𝚗𝚍𝚜1P[[]]𝚌𝚘𝚟𝚎𝚛𝚎𝚡𝚝𝚎𝚗𝚍𝚜(λlc,𝙵𝙰𝙽lcP)[]

after having checked that the following statements hold: [[]]=𝚕𝚒𝚜𝚝_𝚏𝚊𝚗[], 𝚎𝚡𝚝𝚎𝚗𝚍𝚜lm𝚎𝚡𝚝𝚎𝚗𝚍𝚜(𝚕𝚒𝚜𝚝_𝚏𝚊𝚗l)(𝚕𝚒𝚜𝚝_𝚏𝚊𝚗m) and 1P(𝚕𝚒𝚜𝚝_𝚏𝚊𝚗lc)𝙵𝙰𝙽lcP.

Theorem 6 of [10] (cf. Theorem 15), and its original proof, even though it uses one particular implementation of 𝚕𝚒𝚜𝚝_𝚏𝚊𝚗 both in the proved statement and inside the arguments, can be adapted to work for any implementation of 𝚕𝚒𝚜𝚝_𝚏𝚊𝚗 as soon as it satisfies 𝚕𝚒𝚜𝚝_𝚏𝚊𝚗_𝚜𝚙𝚎𝚌. The reason is that we pass through 𝙵𝙰𝙽_𝚋𝚊𝚛 which is independent of the actual implementation of 𝚕𝚒𝚜𝚝_𝚏𝚊𝚗. This is how the proof is implemented our Coq code.

Besides the previous remark and the detour via inductive covers, the proof we give differs from that of [10] in an important way. Indeed, the core argument of the later proof is the closure of monotone inductive 𝚋𝚊𝚛s under binary intersection [10, Proposition 3]:

𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎P𝚖𝚘𝚗𝚘𝚝𝚘𝚗𝚎Q𝚋𝚊𝚛Pl𝚋𝚊𝚛Ql𝚋𝚊𝚛(PQ)l

which is there established by nested inductions on 𝚋𝚊𝚛Pl, and then on 𝚋𝚊𝚛Ql. On the contrary, the core argument in the proof of Theorem 14 lies in 𝚌𝚘𝚟𝚎𝚛_𝚏𝚒𝚖𝚊𝚐𝚎_𝚞𝚗𝚒𝚘𝚗, i.e. the closure of 𝚌𝚘𝚟𝚎𝚛T1P under binary union (the append operator on lists). In a way, it generalizes to upward closed inductive covers the stability under binary unions of finiteness.

5 Weaker variants of the contrapositive of Kőnig’s lemma

Recall the contrapositive form of Kőnig’s lemma: any finitely branching tree without infinite branches is finite. We introduce (inductive) rose trees, i.e. finite trees with arbitrary (finite) branching at each node, and we give a type theoretic variant which has stronger assumptions (e.g. the covering assumption below), and which replaces the notion of possibly infinite tree that is implicit in formulation “any … tree without infinite branches” with that of a relation:

Assume a finitely branching relation T:𝚛𝚎𝚕2X and P:𝚛𝚎𝚕1X which is T-upward closed. If x belongs to the T-cover of P then the finite paths along T starting at x and avoiding P are the branches of a rose tree rooted at x.

Notice that we use equivalence between paths and branches to express that (part of) a relation is “the same” as a rose tree. Because we only view the relation via its paths, the acyclicity assumption, as used when (infinite) trees are viewed as graphs, can be dropped. But before we formalize this statement, we must define paths, rose trees and their branches.

5.1 Path, rose trees and their branches

Let us fix a type X as carrier for relations and indices of rose trees below.

Definition 16 (Inductive path).

For a relation T:𝚛𝚎𝚕2X, the paths in T are described by a ternary relation 𝚙𝚊𝚝𝚑T:X𝚕𝚒𝚜𝚝XX defined by two inductive rules:

Intuitively, 𝚙𝚊𝚝𝚑Txpy means that p is the sequence of values encountered on a path from x to y, following the relation T, including the endpoint y but excluding starting point x. The existence of a T-path from x to y is equivalent to the reflexive-transitive closure of T (we do not use this characterization however), and hence we have:

𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍_𝚙𝚊𝚝𝚑TP:𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍TP𝚞𝚙𝚌𝚕𝚘𝚜𝚎𝚍(λxy,p,𝚙𝚊𝚝𝚑Txpy)P.
Definition 17 (Inductive rose tree).

The type of X-indexed rose trees denoted 𝚝𝚛𝚎𝚎X:𝚃𝚢𝚙𝚎 is inductively defined by a single rule:

where we denote x|l as a shortcut for (𝚗𝚘𝚍𝚎xl). The root of t=x|l is indexed by x and we write 𝚛𝚘𝚘𝚝t=x, and l is the list of the sons of t. We define the height of a rose tree, denoted 𝚝𝚛𝚎𝚎_𝚑𝚝:𝚝𝚛𝚎𝚎X, using the fixpoint equation 𝚝𝚛𝚎𝚎_𝚑𝚝x|[t1;;tn]=1+𝚕𝚒𝚜𝚝_𝚖𝚊𝚡[𝚝𝚛𝚎𝚎_𝚑𝚝t1;;𝚝𝚛𝚎𝚎_𝚑𝚝tn].

The branches of a rose tree (the paths starting at the root) are characterized using a ternary relation 𝚋𝚛𝚊𝚗𝚌𝚑:𝚝𝚛𝚎𝚎X𝚕𝚒𝚜𝚝XX inductively defined by two rules:

Hence a branch is either empty, stopping at the root, or the choice of a son (i.e. sub-tree) and of a branch in that son. The predicate 𝚋𝚛𝚊𝚗𝚌𝚑tpy relates a tree t, a list of visited indices p up to the index y of the root of a sub-tree of t.

5.2 Representing binary relations using rose trees

We give a formal definition for the statement “a binary relation is a finite tree.” This is required indeed because the type of binary relations and the type of rose trees are very different. We use paths in relations and branches in rose trees as a means to define the notion of representation by a rose tree, for the part of a relation T:𝚛𝚎𝚕2X rooted at x of which the paths from x satisfy the property P:𝚕𝚒𝚜𝚝XX.

Definition 18 (Representation).

Assume a binary relation T:𝚛𝚎𝚕2X, a property for paths P:𝚕𝚒𝚜𝚝XX and a point x:X. We say that P in T at x is strongly represented by t:𝚝𝚛𝚎𝚎X and write 𝚜𝚝𝚛𝚘𝚗𝚐𝚕𝚢_𝚛𝚎𝚙𝚛𝚎𝚜𝚎𝚗𝚝𝚜TPxt if:

𝚜𝚝𝚛𝚘𝚗𝚐𝚕𝚢_𝚛𝚎𝚙𝚛𝚎𝚜𝚎𝚗𝚝𝚜TPxt:=𝚛𝚘𝚘𝚝t=xpy,𝚋𝚛𝚊𝚗𝚌𝚑tpy𝚙𝚊𝚝𝚑TxpyPpy.

We say that P in T at x:X is represented by t:𝚝𝚛𝚎𝚎X and write 𝚛𝚎𝚙𝚛𝚎𝚜𝚎𝚗𝚝𝚜TPxt if:

𝚛𝚎𝚙𝚛𝚎𝚜𝚎𝚗𝚝𝚜TPxt:=𝚛𝚘𝚘𝚝t=xpy,Ppy(𝚋𝚛𝚊𝚗𝚌𝚑tpy𝚙𝚊𝚝𝚑Txpy).

The property P for paths is applied only to those originating at x but can depend on the destination as well as on the sequence of visited nodes on the path to the destination.

We observe that 𝚜𝚝𝚛𝚘𝚗𝚐𝚕𝚢_𝚛𝚎𝚙𝚛𝚎𝚜𝚎𝚗𝚝𝚜TPxt𝚛𝚎𝚙𝚛𝚎𝚜𝚎𝚗𝚝𝚜TPxt. While the strong notion would be a first/natural choice to formalize the idea that the relation T starting at x and restricted by P “is a tree,” this choice can however be questioned in the light of decidability issues. Indeed, when X is equipped with a (propositionally) decidable equality,151515i.e. xy:X,x=yxy. e.g. when X=, then both 𝚋𝚛𝚊𝚗𝚌𝚑tpy and 𝚙𝚊𝚝𝚑Txpy become decidable predicates. In that case, 𝚜𝚝𝚛𝚘𝚗𝚐𝚕𝚢_𝚛𝚎𝚙𝚛𝚎𝚜𝚎𝚗𝚝𝚜TPxt implies that P is decidable as well, an assumption we want to avoid for building representations. In the case of 𝚛𝚎𝚙𝚛𝚎𝚜𝚎𝚗𝚝𝚜, P does not need to be decidable but the representing tree may contain branches which do not satisfy P.

We assume a fixed T:𝚛𝚎𝚕2X which is furthermore finitely branching, i.e. x,𝚏𝚒𝚗𝚒𝚝𝚎(Tx). We show that paths of bounded length can be strongly represented.

Theorem 19.

When T:𝚛𝚎𝚕2X is finitely branching, for any n: and any x:X, the property (λpy,pn) in T at x has a strong representation.

Proof.

We build the tree t s.t. 𝚜𝚝𝚛𝚘𝚗𝚐𝚕𝚢_𝚛𝚎𝚙𝚛𝚎𝚜𝚎𝚗𝚝𝚜T(λpy,pn)xt by induction on n, after generalizing on x.

Now we characterize the properties of paths that have representations as those which hold only for small paths.

Theorem 20.

When T:𝚛𝚎𝚕2X is finitely branching, for any property P:𝚕𝚒𝚜𝚝XX and any point x:X, the two following statements are equivalent:

  • t,𝚛𝚎𝚙𝚛𝚎𝚜𝚎𝚗𝚝𝚜TPxt;

  • n,py,𝚙𝚊𝚝𝚑TxpyPpyp<n.

Proof.

In the forward direction, the bound n can be chosen to be the height 𝚝𝚛𝚎𝚎_𝚑𝚝t of the representation of P in T at x. In the reverse direction, given a bound n for the length of paths satisfying P, we first obtain a tree t s.t. 𝚜𝚝𝚛𝚘𝚗𝚐𝚕𝚢_𝚛𝚎𝚙𝚛𝚎𝚜𝚎𝚗𝚝𝚜T(λpy,pn)xt. We then check that this tree t represents P in T at x.

Theorem 20 states that, in the finitely branching case, a relation is represented by a (finite) rose tree if and only if there is a global bound on the length of its paths. In the context of the FAN theorem (the contrapositive of Kőnig’s lemma), it relates the finiteness of a tree to the boundedness of its height, the length of its longest branch. It can be compared to the characterization of binary trees161616as sets of finite sequences of Booleans representing their finite branches. which are finite as those for which there is a uniform bound on the length of their branches, see e.g. [15].

5.3 Kőnig’s lemma for inductive covers, accessibility and inductive bars

We establish statements of weakened variants of (the contrapositive of) Kőnig’s lemma, assuming e.g. the existence of a cover for the root of the “tree.

Theorem 21 (Kőnig’s lemma for inductive covers).

Let us assume a finitely branching binary relation T:𝚛𝚎𝚕2X, i.e. x,𝚏𝚒𝚗𝚒𝚝𝚎(Tx), a T-upward closed unary relation P:𝚛𝚎𝚕1X, a root x:X which is T-covered by P. Then the paths which refute P at their tail are represented in T at x, i.e. t,𝚛𝚎𝚙𝚛𝚎𝚜𝚎𝚗𝚝𝚜T(λpy,¬Py)xt.

Proof.

Using the length of paths, we define 𝚌𝚒𝚛𝚌𝚕𝚎n, the circle (centered at x) of radius n, and the collection of Q:𝚛𝚎𝚕1(𝚕𝚒𝚜𝚝X) of finite supports of some circle as

𝚌𝚒𝚛𝚌𝚕𝚎n:=λy,p,𝚙𝚊𝚝𝚑Txpyn=pQl:=n,x,𝚌𝚒𝚛𝚌𝚕𝚎nxxl.

Because T has finite direct images, we deduce that circles are finite, by induction on n. Hence we get n,𝚏𝚒𝚗𝚒𝚝𝚎(𝚌𝚒𝚛𝚌𝚕𝚎n).

Let us show that Q meets 1P. Indeed, as we assume 𝚌𝚘𝚟𝚎𝚛TPx, using the FAN Theorem 14 for covers we get 𝚌𝚘𝚟𝚎𝚛T1P[x]. Then we use 𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐𝚊𝚝𝚒𝚟𝚎 with Q. We only need to show that Q holds at [x] and is T-unstoppable i.e. l,Qlm,QmTlm:

  • Q[x] holds because [x] is a support for the circle of radius 0;

  • Q is T-unstoppable because the circle of radius 1+n is a T-image of that of radius n.

As Q meets 1P, then P contains some circle, i.e. there is n such that 𝚌𝚒𝚛𝚌𝚕𝚎nP. As a consequence, since T-paths from x of length greater that n cross 𝚌𝚒𝚛𝚌𝚕𝚎n hence meet P at that crossing point, their tail must belong to P as well, because P is T-upward closed. Hence py,𝚙𝚊𝚝𝚑TxpynpPy holds and we conclude using Theorem 20.

This proof uses the FAN Theorem 14 for inductive covers, and then combines it with the 𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐𝚊𝚝𝚒𝚟𝚎 characterization. The finiteness of circles n,𝚏𝚒𝚗𝚒𝚝𝚎(𝚌𝚒𝚛𝚌𝚕𝚎n), which lives  (and not in 𝚃𝚢𝚙𝚎), is not strong enough to be able to define 𝚌𝚒𝚛𝚌𝚕𝚎 as a map 𝚕𝚒𝚜𝚝X, which would be needed if the 𝚌𝚘𝚟𝚎𝚛_𝚜𝚎𝚚𝚞𝚎𝚗𝚌𝚎𝚜 characterization were to be used instead of 𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐𝚊𝚝𝚒𝚟𝚎.

As the instance of Theorem 21 where P:=, we recover a finitary form of Kőnig’s lemma similar to [1, p. 15]. A direct proof by induction on (the proof of) 𝚊𝚌𝚌Tx would probably be shorter but we here illustrate the generality of Kőnig’s lemma for inductive covers.

Corollary 22 (Kőnig’s lemma for accessibility [1]).

Let T:𝚛𝚎𝚕2X be a binary relation s.t. x,𝚏𝚒𝚗𝚒𝚝𝚎(Tx) and let x:X be a T-accessible point of X, i.e. 𝚊𝚌𝚌Tx. Then there is a rose tree t:𝚝𝚛𝚎𝚎X with root x such that the T-paths from x are exactly the branches of t.

We present a variant of Kőnig’s lemma for inductive bars. It is not exactly an instance of Theorem 21 because the properties of paths are not limited to those of their endpoint.

Theorem 23 (Kőnig’s lemma for inductive bars).

Let us assume a finitely branching binary relation T:𝚛𝚎𝚕2X, a monotone unary relation P:𝚛𝚎𝚕1(𝚕𝚒𝚜𝚝X), and a point x:X. If 𝚋𝚊𝚛P[] then t,𝚛𝚎𝚙𝚛𝚎𝚜𝚎𝚗𝚝𝚜T(λpy,¬P(𝚛𝚎𝚟p))xt.

Proof.

The proof is comparable (not identical) to the proof of Theorem 21 and uses 𝙵𝙰𝙽_𝚋𝚊𝚛 and 𝚋𝚊𝚛_𝚗𝚎𝚐𝚊𝚝𝚒𝚟𝚎 instead as replacements for 𝙵𝙰𝙽_𝚌𝚘𝚟𝚎𝚛 and 𝚌𝚘𝚟𝚎𝚛_𝚗𝚎𝚐𝚊𝚝𝚒𝚟𝚎.

5.4 Kőnig’s lemma for sequences of finite choices

Bar predicates can be specialized using the notion of good sequence, i.e. one containing a redundant pair w.r.t. a binary (redundancy) relation. This relation can be the identity, but there are other interesting cases, e.g. multiset inclusion [20]. In this case, bar predicates characterize inductive almost full relations [20, 31].

We assume a binary relation R:𝚛𝚎𝚕2X to represent a notion of redundancy, and define two unary relations 𝚐𝚘𝚘𝚍R and 𝚒𝚛𝚛𝚎𝚍R of type 𝚛𝚎𝚕1(𝚕𝚒𝚜𝚝X), 𝚐𝚘𝚘𝚍R characterizing lists which contain a good pair, and 𝚒𝚛𝚛𝚎𝚍R characterizing lists which are irredundant, i.e. avoiding good pairs:171717See [21] for an equivalent inductive characterization of 𝚐𝚘𝚘𝚍R.

𝚐𝚘𝚘𝚍Rp:=lxmyr,p=l++[x]++m++[y]++rRyx;𝚒𝚛𝚛𝚎𝚍Rp:=lxmyr,p=l++[x]++m++[y]++rRxy.

It is obvious that 𝚐𝚘𝚘𝚍R is monotone. Moreover, we show the correspondence between bad (i.e. not good) lists and irredundant ones:181818𝚐𝚘𝚘𝚍 and 𝚒𝚛𝚛𝚎𝚍 use R in opposite ways, hence the use of the 𝚛𝚎𝚟erse function.

𝚗𝚘𝚝_𝚐𝚘𝚘𝚍_𝚒𝚏𝚏_𝚒𝚛𝚛𝚎𝚍Rp:¬(𝚐𝚘𝚘𝚍R(𝚛𝚎𝚟p))𝚒𝚛𝚛𝚎𝚍Rp.
Definition 24 (Almost full relation [31]).

For binary relations R:𝚛𝚎𝚕2X, we define the predicate 𝚊𝚏R: using the two inductive rules, where Ru:=λxy,RxyRux:

We recall that 𝚊𝚏R is another way of stating (i.e. is equivalent to) 𝚋𝚊𝚛(𝚐𝚘𝚘𝚍R)[] (see e.g. [20, p. 11] or [21]) but below we just need the implication in this direction:

𝚊𝚏__𝚋𝚊𝚛_𝚐𝚘𝚘𝚍_𝚗𝚒𝚕R:𝚊𝚏R𝚋𝚊𝚛(𝚐𝚘𝚘𝚍R)[].

Proof.

First we establish 𝚋𝚊𝚛(𝚐𝚘𝚘𝚍Ru)p𝚋𝚊𝚛(𝚐𝚘𝚘𝚍R)(p++[u]) by induction on 𝚋𝚊𝚛(𝚐𝚘𝚘𝚍Ru)p. As an instance where p:=[], we get 𝚋𝚊𝚛(𝚐𝚘𝚘𝚍Ru)[]𝚋𝚊𝚛(𝚐𝚘𝚘𝚍R)[u]. Then we can show the implication 𝚊𝚏R𝚋𝚊𝚛(𝚐𝚘𝚘𝚍R)[] by induction on 𝚊𝚏R.

We can deduce usual the sequential characterization of almost full relations, but, as with covers and bars, this characterization is constructively weaker.

𝚊𝚏_𝚜𝚎𝚚𝚞𝚎𝚗𝚌𝚎𝚜R:𝚊𝚏Rα:X,ij,i<jRαiαj.

Proof.

We obtain n such that 𝚐𝚘𝚘𝚍R[αn1;;α0] using 𝚊𝚏__𝚋𝚊𝚛_𝚐𝚘𝚘𝚍_𝚗𝚒𝚕 above, followed by 𝚋𝚊𝚛_𝚜𝚎𝚚𝚞𝚎𝚗𝚌𝚎𝚜 from Section 3.5. We conclude by analyzing the identity l++[x]++m++[y]++r=[αn1;;α0] where Ryx holds.

We finish our tour of weakened forms of Kőnig’s lemma with a slightly different form where the outcome is not a representing rose tree but just its height, hence a bound on the length of its branches. In light of Theorem 20, these are equivalent conditions for finitely branching relations. While we insisted so far on getting tree representations in the spirit of Kőnig’s lemma, in its applications on e.g. termination, a bound on the height of this tree is often sufficient to conclude.

Given a sequence of relations P:𝚛𝚎𝚕1X, we define a predicate 𝚌𝚑𝚘𝚒𝚌𝚎_𝚕𝚒𝚜𝚝P:𝚛𝚎𝚕1(𝚕𝚒𝚜𝚝X) such that 𝚌𝚑𝚘𝚒𝚌𝚎_𝚕𝚒𝚜𝚝P[x0;;xn1]P0x0Pn1xn1, i.e. 𝚌𝚑𝚘𝚒𝚌𝚎_𝚕𝚒𝚜𝚝Pl holds exactly when the members of l are successive choices in P0, P1, …

Theorem 25.

Given an almost full relation, i.e. R:𝚛𝚎𝚕2X s.t. 𝚊𝚏R, and a sequence of finite unary relations, i.e. P:𝚛𝚎𝚕1X s.t. n,𝚏𝚒𝚗𝚒𝚝𝚎Pn. Then the length of irredundant choice lists for P is (uniformly) bounded. Formally, we get:

𝚊𝚏R(n,𝚏𝚒𝚗𝚒𝚝𝚎Pn)n,l,𝚌𝚑𝚘𝚒𝚌𝚎_𝚕𝚒𝚜𝚝Pl𝚒𝚛𝚛𝚎𝚍Rll<n.

Proof.

From 𝚊𝚏__𝚋𝚊𝚛_𝚐𝚘𝚘𝚍_𝚗𝚒𝚕, we know that 𝚋𝚊𝚛(𝚐𝚘𝚘𝚍R)[] holds and we apply the 𝙵𝙰𝙽_𝚋𝚊𝚛 form of Theorem 15 and derive 𝚋𝚊𝚛(λlc,𝙵𝙰𝙽lc𝚐𝚘𝚘𝚍R)[].

We define 𝚜𝚞𝚙𝚙𝚘𝚛𝚝nl:=x,Pnxxl, meaning that l is a supporting list for the (finite) unary relation Pn. We use the 𝚋𝚊𝚛_𝚗𝚎𝚐𝚊𝚝𝚒𝚟𝚎 characterization of inductive bars applied to 𝚋𝚊𝚛(λlc,𝙵𝙰𝙽lc𝚐𝚘𝚘𝚍R)[] with Q:=λlc,𝚌𝚑𝚘𝚒𝚌𝚎_𝚕𝚒𝚜𝚝𝚜𝚞𝚙𝚙𝚘𝚛𝚝(𝚛𝚎𝚟lc). We get lc such that 𝙵𝙰𝙽lc𝚐𝚘𝚘𝚍R and 𝚌𝚑𝚘𝚒𝚌𝚎_𝚕𝚒𝚜𝚝𝚜𝚞𝚙𝚙𝚘𝚛𝚝(𝚛𝚎𝚟lc).

Then we check that n:=lc satisfies the property l,𝚌𝚑𝚘𝚒𝚌𝚎_𝚕𝚒𝚜𝚝Pll=n𝚐𝚘𝚘𝚍R(𝚛𝚎𝚟l). The same value then bounds the length of irredundant choice lists for P.

Again, we use a combination of a FAN theorem and the negative characterization of inductive bars. The assumption of finiteness n,𝚏𝚒𝚗𝚒𝚝𝚎Pn: is not strong enough to be able to build a sequence 𝚕𝚒𝚜𝚝X that enumerates the respective supports for P0, P1, … but the negative characterization allows us to reason without escaping from the  sort.

5.5 Type-bounded variants and the FAN functional

To answer a question of one of the reviewers, we briefly discuss how the FAN theorem for covers and its consequences can be lifted to 𝚃𝚢𝚙𝚎-bounded variants allowing for the computation of FAN functionals, which output bounds on the length of branches of finite trees. For this, the types of the 𝚌𝚘𝚟𝚎𝚛, 𝚋𝚊𝚛 or 𝚊𝚏 predicates are lifted as:

𝚌𝚘𝚟𝚎𝚛t{X}(T:XX𝚃𝚢𝚙𝚎)(P:𝚛𝚎𝚕1X):X𝚃𝚢𝚙𝚎𝚋𝚊𝚛t{X}(P:𝚛𝚎𝚕1(𝚕𝚒𝚜𝚝X)):𝚕𝚒𝚜𝚝X𝚃𝚢𝚙𝚎𝚊𝚏t{X}(R:𝚛𝚎𝚕2X):𝚃𝚢𝚙𝚎

and, as a consequence, parts of the 𝙻𝚒𝚜𝚝 and 𝙿𝚎𝚛𝚖𝚞𝚝𝚊𝚝𝚒𝚘𝚗 library results need to be given 𝚃𝚢𝚙𝚎-bounded variants as well. Noticeably, the transition relation argument T in 𝚌𝚘𝚟𝚎𝚛t is lifted, and not only its output sort.

In Coq jargon, we say that those predicates become informative, meaning that their inductive structure can be used to compute values of sort 𝚃𝚢𝚙𝚎, typically bounds on the length of branches in . As an illustration here, these variants include the following FAN functional, lifting Theorem 25 above to an output of sort 𝚃𝚢𝚙𝚎:

𝚊𝚏tR(n,𝚏𝚒𝚗𝚒𝚝𝚎tPn){n:l,𝚌𝚑𝚘𝚒𝚌𝚎_𝚕𝚒𝚜𝚝Pl𝚒𝚛𝚛𝚎𝚍Rll<n}

where 𝚏𝚒𝚗𝚒𝚝𝚎t{X}(P:X):={lx,Pxxl} is the lifting of finiteness.

We delegate to the distributed Coq code, specifically file 𝚌𝚘𝚗𝚜𝚝𝚛𝚞𝚌𝚝𝚒𝚟𝚎_𝚔𝚘𝚗𝚒𝚐_𝚝𝚢𝚙𝚎.𝚟, the explanations on how such liftings are performed.

6 Two examples of replacements of Kőnig’s lemma

In this section, we discuss two applications of our constructive variants of Kőnig’s lemma that allow to transfer some “classical” proofs into the realm of constructive mathematics.

6.1 The decidability from implicational relevance logic

In [20], we use a variant of Kőnig’s lemma for almost full relations, corresponding here to Theorem 25, to show the termination of an exhaustive proof search procedure for implicational relevance logic (IR), based on a sequent system designed by Curry [8]. The termination of this system was established by Kripke [17], building on Curry’s work, rediscovering Dickson’s lemma, and concluding with Kőnig’s lemma.

The idea of the proof is the following. Curry’s sequent proof system is proved sound and complete for IR. It has three essential properties:

  • each sequent rule has finitely many premises, in fact less than two;

  • for any conclusion, there are only finitely many rule instances having that conclusion;

  • there is a notion of redundancy for sequents such that, if a sequent S2 is redundant over S1, then any proof of S2 can be contracted into a proof of S1 of lesser height. This property is called Curry’s lemma.

Kripke proved that the notion of redundancy, derived from the natural inclusion ordering on multisets, forms a well quasi order (WQO), and thus any sequence of sequents contains a redundant pair. Notice that the WQO terminology and Dickson’s lemma, the key ingredient in the result, were only popularized later on. Then, using Curry’s lemma, Kripke argued that any proof search branch must contain a redundant pair, and by Kőnig’s lemma, the proof search tree for irredundant proofs is finite.

Replacing the classical approach to WQOs by inductive almost full relations, in [20] we prove that the notion of redundancy is almost full, the constructive form of Dickson’s lemma been derived from Coquand’s constructive form of Ramsey’s theorem [31]. Then we use the 𝚃𝚢𝚙𝚎-bounded variant of Theorem 25 called 𝙲𝚘𝚗𝚜𝚝𝚛𝚞𝚌𝚝𝚒𝚟𝚎_𝙺𝚘𝚎𝚗𝚒𝚐𝚜_𝚕𝚎𝚖𝚖𝚊 and outlined in Section 5.5 to show that the irredundant part of the proof search tree has a computable bound on its height, so the search process can be safely pruned above that height.

6.2 Building Harvey Friedman’s 𝐓𝐑𝐄𝐄(𝒏) monster

In [23], we build on a Coq constructive proof of Kruskal’s tree theorem [22] to implement TREE(n) function (that we specify below), invented and studied by Harvey Friedman [11] in his groundbreaking work on reverse mathematics.

The (homeomorphic) embedding on rose trees is a WQO as soon as the comparison between decorations of the nodes is itself a WQO: this is the statement of Kruskal’s theorem in a classical setting. In [22], we implement a constructively provable form by replacing WQOs with (inductive) 𝚊𝚏 relations (see Definition 24). Notice that this constructive form of Kruskal’s theorem has a quite involved proof that we do not discuss here.

Using Kruskal’s theorem, the homeomorphic embedding between roses trees decorated with elements of the finite set {1,,n} is 𝚊𝚏 and we use this relation as our redundancy relation. This means, using the sequential characterization 𝚊𝚏_𝚜𝚎𝚚𝚞𝚎𝚗𝚌𝚎𝚜 of Section 5.4, that any sequence T1, T2,… of roses trees contains a redundant pair. Now Friedman bounds the number of possible choice for Ti by requiring that its size (number of nodes) is less than i: we say that Ti is sized. Hence, considering the set of all such sized sequences (Ti)0<i, they form a finitely branching tree and all infinite branches contain a redundant pair. Following the argumentation of e.g. [13], by Kőnig’s lemma, the irredundant part of that tree is finite and thus sized sequences have maximal length, which is by definition TREE(n).

We circumvent this classical argumentation by applying Theorem 25, hence, according to its proof, first applying the FAN theorem for inductive bars and then the negative characterization of inductive bars. We obtain, constructively, the existence of a uniform bound on the length of irredundant sequences of sized trees (Ti)0<i. The exact value of the bound, i.e. TREE(n), can then be computed by unbounded linear search [23].191919Using a 𝚃𝚢𝚙𝚎-bounded variant of Theorem 25, one can use bounded linear search instead of unbounded linear search. However, there is little to gain in obtaining an efficient algorithm for computing TREE(n) since writing TREE(3) in decimal would already exhaust all atoms of the known universe.

7 Conclusion

Besides the Coq script that supports the results presented herein, we can summarize our contributions as following. We show that the notion of inductive cover generalizes both accessibility and bar inductive predicates, hence we can discuss concepts and results at the level of covers and they instantiate on these restricted notions as well. We follow Coquand’s program [6] and replace characterizations based on sequences with inductive ones, that constructively do not fall short on lawless sequences.

We compare the strength of the positive, negative and sequential characterizations of covers, or (as an instance) of “being a bar,” both in constructive and classical contexts. We analyze the precise roles played by the axioms of excluded middle and dependent choice.

The negative characterization is a remarkable intermediate notion: a) it is a De Morgan dual of the positive characterization; b) it expels determinism from the sequential characterization, and shares properties with Brouwer’s notion of spread; c) it is relevant in practice, for instance when dealing with 𝙿𝚛𝚘𝚙-bounded Coq definitions.

We give a concise constructive proof of a FAN theorem for inductive covers that generalizes the type theoretic interpretation of the FAN theorem for inductive bars [10]. We notice that the respective core argument of these two proofs differ significantly.

The negative or sequential characterizations of covers (or bars) are weaker than the positive/inductive characterization. They fail when trying to constructively establish important closure properties, such as the FAN theorem. However, they can still be used constructively, after the inductive FAN theorem, to obtain uniform bounds on the length of branches of trees. This is the core argumentation behind several weaker variants of Kőnig’s lemma that we derive and present, herein insisting on representations by inductive rose trees.

To conclude, we discuss two applications of those constructive variants of Kőnig’s lemma that allow the transport of classical results in the constructive realm.

Almost full relations give a satisfactory constructive account for the notion of well quasi order, i.e., finitary closure properties such as Dickson’s lemma, Higman’s lemma and Kruskal’s tree theorem can be constructively established with this notion. However, as far as we are aware, the stronger notion of better quasi order (BQO) has not yet been given a suitable inductive account, and it would be quite a challenge to lean towards an inductive definition of BQOs, hopefully satisfying additional infinitary closure properties.

References

  • [1] F. Baader and T. Nipkow. Term Rewriting and All That. Cambridge University Press, 1998.
  • [2] J. Berger. Brouwer’s fan theorem, 2021. doi:10.48550/arXiv.2001.00064.
  • [3] J. Berger and H. Ishihara. Brouwer’s fan theorem and unique existence in constructive analysis. Mathematical Logic Quarterly, 51(4):360–364, 2005. doi:10.1002/malq.200410038.
  • [4] J. Berger and G. Svindland. Brouwer’s fan theorem and convexity. The Journal of Symbolic Logic, 83(4):1363–1375, 2018. doi:10.1017/jsl.2018.49.
  • [5] C. Cheung. Brouwer’s Fan Theorem: An Overview. Master’s thesis, Cornell University, 2015. URL: https://api.semanticscholar.org/CorpusID:203584866.
  • [6] T. Coquand. About Brouwer’s Fan Theorem. Revue internationale de philosophie, 230:483–489, September 2004. URL: http://www.jstor.org/stable/23955601.
  • [7] T. Coquand, G. Sambin, J. Smith, and S. Valentini. Inductively generated formal topologies. Annals of Pure and Applied Logic, 124(1):71–106, 2003. doi:10.1016/S0168-0072(03)00052-6.
  • [8] H. B. Curry. A Theory of Formal Deductibility. Notre Dame mathematical lectures. University of Notre Dame, 1957.
  • [9] M. Escardo. Infinite sets that admit fast exhaustive search. In 22nd Annual IEEE Symposium on Logic in Computer Science (LICS 2007), pages 443–452, 2007. doi:10.1109/LICS.2007.25.
  • [10] D. Fridlender. An Interpretation of the Fan Theorem in Type Theory. In Types for Proofs and Programs, pages 93–105. Springer Berlin Heidelberg, 1999. doi:10.1007/3-540-48167-2_7.
  • [11] H. M. Friedman. Internal finite tree embeddings. In Reflections on the Foundations of Mathematics: Essays in Honor of Solomon Feferman, Lecture Notes in Logic, pages 60–91. Cambridge University Press, 2002.
  • [12] M. Fujiwara. Kőnig’s lemma, weak Kőnig’s lemma, and the decidable fan theorem. Mathematical Logic Quarterly, 67(2):241–257, 2021. doi:10.1002/malq.202000020.
  • [13] J. H. Gallier. What’s so special about Kruskal’s theorem and the ordinal Γ0? A survey of some results in proof theory. Annals of Pure and Applied Logic, 53(3):199–260, 1991. doi:10.1016/0168-0072(91)90022-E.
  • [14] W. Hanf. Nonrecursive Tilings of the Plane. I. The Journal of Symbolic Logic, 39(2):283–285, 1974. doi:10.2307/2272640.
  • [15] H. Ishihara. Weak Kőnig’s Lemma Implies Brouwer’s Fan Theorem: A Direct Proof. Notre Dame Journal of Formal Logic, 47(2):249–252, 2006. doi:10.1305/ndjfl/1153858649.
  • [16] S. C. Kleene and R. E. Vesley. The Foundations of Intuitionistic Mathematics: Especially in Relation to Recursive Functions. North-Holland Publishing Co., 1965.
  • [17] S. Kripke. The Problem of Entailment (abstract). Journal of Symbolic Logic, 24:324, 1959.
  • [18] D. Kőnig. Über eine Schlussweise aus dem Endlichen ins Unendliche. Acta Sci. Math. (Szeged), 3(2–3):121–130, 1927.
  • [19] D. Larchey-Wendling. Constructive substitutes for Kőnig’s lemma (artifact). Software, NARCO (ANR-21-CE48-0011), swhId: swh:1:dir:611c848b0dbc19c9de20744122776440c00e413d (visited on 2025-05-25). URL: https://github.com/DmxLarchey/Constructive-Konig, doi:10.4230/artifacts.23151.
  • [20] D. Larchey-Wendling. Constructive Decision via Redundancy-Free Proof-Search. Journal of Automated Reasoning, 64:1197–1219, 2020. doi:10.1007/s10817-020-09555-y.
  • [21] D. Larchey-Wendling. Quasi Morphisms for Almost Full Relations. In 30th International Conference on Types for Proofs and Programs, TYPES, 2024. URL: https://easychair.org/publications/preprint/M3Km.
  • [22] D. Larchey-Wendling. The Coq-Kruskal project, April 2024. URL: https://github.com/DmxLarchey/Coq-Kruskal.
  • [23] D. Larchey-Wendling. The Friedman-TREE project, November 2024. URL: https://github.com/DmxLarchey/Friedman-TREE.
  • [24] D. Myers. Nonrecursive Tilings of the Plane. II. The Journal of Symbolic Logic, 39(2):286–294, 1974. doi:10.2307/2272641.
  • [25] C. Sacerdoti Coen and S. Valentini. General Recursion and Formal Topology. In PAR-10. Partiality and Recursion in Interactive Theorem Provers, volume 5 of EPiC Series in Computing, pages 72–83. EasyChair, 2012. doi:10.29007/hl75.
  • [26] S. G. Simpson. Subsystems of Second Order Arithmetic. Perspectives in Logic. Cambridge University Press, 2 edition, 2009.
  • [27] A. S. Troelstra. Note on the Fan Theorem. The Journal of Symbolic Logic, 39(3):584–596, 1974. doi:10.2307/2272902.
  • [28] A. S. Troelstra. Some Models for Intuitionistic Finite Type Arithmetic with Fan Functional. The Journal of Symbolic Logic, 42(2):194–202, 1977. doi:10.2307/2272120.
  • [29] W. Veldman. Brouwer’s Real Thesis on Bars. Philosophia Scientiæ, pages 21–42, 2006. doi:10.4000/philosophiascientiae.404.
  • [30] W. Veldman. Brouwer’s Fan Theorem as an axiom and as a contrast to Kleene’s alternative. Arch. Math. Logic, 53:621–693, 2014. doi:10.1007/s00153-014-0384-9.
  • [31] D. Vytiniotis, T. Coquand, and D. Wahlstedt. Stop When You Are Almost-Full. In Interactive Theorem Proving, pages 250–265. Springer Berlin Heidelberg, 2012. doi:10.1007/978-3-642-32347-8_17.