As discussed at length on the mailing list some time ago, there are several different things that one might mean by saying that a function is “constant”. Here is my preferred terminology:

- is
**constant**if we have such that for all .

This is equivalent to saying that factors through . - is
**conditionally constant**if it factors through . - is
**weakly constant**if for all we have .

In particular, the identity function of is conditionally constant, but not constant. I don’t have a problem with that; getting definitions right often means that they behave slightly oddly on the empty set (until we get used to it). The term “weakly constant” was introduced by Kraus, Escardo, Coquand, and Altenkirch, although they immediately dropped the adjective for the rest of their paper, which I will not do. The term “conditionally constant” is intended to indicate that is, or would be, constant, as soon as its domain is inhabited.

It’s obvious that every constant function is conditionally constant, and shows the converse fails. Similarly, it’s easy to show that conditionally constant implies weakly constant. KECA showed that the converse holds if either is a set or , and conjectured that it fails in general. In this post I will describe a counterexample proving this conjecture.

First of all, we have to be a little careful, because for general types *none* of the notions of constancy are mere propositions. So it’s a different thing to ask whether “weakly constant implies conditionally constant” or whether “merely weakly constant implies merely conditionally constant”. In fact, the latter is consistent, because it follows from , which in turn follows from LEM (it is the “propositional axiom of choice”). In particular, in the simplicial set model, merely weakly constant does imply merely conditionally constant.

However, I claim that the stronger statement “weakly constant implies conditionally constant” is actually *inconsistent with univalence*. The consistency of the truncated version of the statement means that we can’t expect to exhibit a single counterxample to the stronger statement in the empty context. But we can hope to find a *family* of counterexamples, along the lines of Theorem 3.2.2 in the book, showing that there cannot be any *uniform* proof of conditional constancy from weak constancy. To do this, we will use two standard techniques for constructing counterexamples: (1) consider the universal case, and (2) make simplifying assumptions.

To start with, we’re looking for a family of functions which are all weakly constant, but which are not all conditionally constant. A first simplification we can try is to let be a constant family, so that we’re looking for .

But now, given and , there is a universal such family, where and is the pairing function. What does it mean to say that for all the function is weakly constant? Well, it means that for any and we have an identification , which is to say we have such that . In other words, the loops at act “transitively” on the points of . (Of course there is no hope of this happening nontrivially if is a set, but we already knew we would need types that aren’t sets for our counterexample.)

Now let’s consider a universal case again: fix a type and let , with the universal family defined by . Now weak constancy of each means that if , then the automorphisms of act transitively on , i.e. for any there is such that . This is something we’ve seen before: Nicolai called this property of being *homogeneous*. Types with decidable equality are homogeneous, including finite types, and decidable equality is preserved by mere equivalence (since it is itself a mere property). So now we have a bunch of examples of families of weakly constant functions, and we can ask whether any of them fail to be all conditionally constant.

Going back to a general and with , what does it mean to say that for all the function is *conditionally* constant? Let’s suppose for simplicity that every type is inhabited, so that conditional constancy is the same as constancy. In that case, what we would be claiming is that there is a function such that for all and we have . Note that the first component of need not be the identity map. However, we can re-express this by saying that the composite is the identity, where the first map is the first projection. In other words, would be a retract of .

Now let’s go back to our examples of families of weakly constant functions, and pick one that’s easy to reason about: let be a finite set of cardinality . Then is the classifying space of the symmetric group , incarnated as the “type of finite sets of cardinality “. What is ? It’s the type of *pointed* finite sets of cardinality . Since this is connected, it is also the classifying space of a group, and in fact the group in question is : an automorphism of a pointed -element set must fix the basepoint, hence is uniquely determined by an automorphism of the remaining elements. Under this identification, the projection is identified with the map induced by the inclusion .

Thus, if our family of functions in this case were all conditionally constant, this map would have a retraction. Taking loop spaces, we conclude that would have a retraction in the category of groups. This is starting to look fishy, and indeed it is rarely the case. It’s true “by accident” for , but after that it starts failing. For instance, when , we have and , so the kernel of any surjection would have cardinality 5; but since 5 is coprime to 24, all 5-cycles would have to be in that kernel, and there are more than five 5-cycles in . Thus, it is false that our family of maps are all conditionally constant; and since they are all weakly constant, it is false that every weakly constant function is conditionally constant.

I enjoy this example quite a lot, because in addition to concepts from HoTT, it uses some not-entirely-trivial facts from finite group theory, notably Lagrange’s theorem. (Of course, it could be that there’s a much simpler counterexample waiting to be found; consider that a challenge!) I’ve *almost* finished formalizing it in the HoTT Coq library. What’s left is to show that 5-cycles have order 5 and that there are more than 5 of them, which should be straightforward but is a little tedious. (I would have waited to post this until the formalization was done, but Martín Escardó is going to give a related talk in Poland in a few weeks, and asked that I make this example public before then.)

Thanks, Mike, for making this publicly available. It is nice to have this recorded. Your construction is very nice, and I am glad to see our conjecture proved.

Perhaps I would like to say why I think this problem is interesting from a “constructive” point of view: sometimes you would like to get X, but you are able to get ||X|| only. If you wish to use the “weaker” information ||X|| to get Y, where Y is a proposition, you simply have to exhibit a function f:X->Y. That is, if from X you can get to Y, then the weaker information ||X|| is enough to get to Y. This is the definition of what the propositional truncation ||X|| is (the universal map of X into a proposition).

More generally, as you say, if Y is a set and f is weakly constant, we can still get ||X||->Y from a constant function f:X->Y (so ||X|| is the set quotient of X by the chaotic equivalence relation). What you say is that if Y is not a set, the weak constancy of f is not enough in general.

The next question is what conditions on f:X->Y are sufficient/necessary to get ||X||->Y, which is something Nicolai has looked at. But there are more related questions on the theme of when we can disclose the information “hidden” in ||X||, and it would be nice to understand this more generally.

You proved that if every weakly constant function f:X->Y factors through ||X||, then univalence fails.

The following is a positive proposition, which strengthens this (for if every type is a set, then univalance fails):

Conjecture: If every weakly constant function f:X->Y factors through ||X||, then all types are sets.

That’s an interesting conjecture! I don’t have any thoughts at the moment about how one might prove or disprove it though. It seems like it would require very different methods.

This is great! I had also tried to find such a consequence, but I didn’t succeed. The “mysterious” construction that you have linked to also came from similar considerations. At that time, I had tried to use that any path space is transitive/homogeneous, in order to show Martin’s conjecture.

Ah, very interesting! Yes, I had wondered whether homogeneity of path spaces could be used as well, but didn’t get anywhere either.

Another remark is this. Intensional MLTT+||-|| is consistent with “global choice” Pi(X:U).||X||->X. But global choice trivially proves that every weakly constant function X->Y factors through ||X||. Combining this with your proof above, we see that the constant factorization question is independent of MLTT+||-||. But notice that global choice proves excluded middle (and the negation of univalence, as shown in the HoTT book). Hence it is still possible that the constant factorization hypothesis proves a “constructive taboo” in MLTT+||-||, in addition to the negation of univalence.

But UIP also proves that every weakly constant function is conditionally constant; so if the latter were a constructive taboo, then so would UIP be, and it isn’t usually regarded as such.

Reblogged this on Almost Rational.

Pingback: Universal Properties of Truncations | Homotopy Type Theory

Pingback: Constructing the Propositional Truncation using Nonrecursive HITs | Homotopy Type Theory