my blog lives here now
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

255 lines
12 KiB

2 years ago
  1. ---
  2. title: The Complete History of isoToEquiv
  3. date: December 17th, 2021
  4. ---
  5. # What's isoToEquiv?
  6. It's a standard fact in (higher) category theory and homotopy theory
  7. that any equivalence of categories (homotopy equivalence) can be
  8. improved to an _adjoint_ equivalence of categories (strong homotopy
  9. equivalence). Adjoint equivalences (and strong homotopy equivalences)
  10. are "more structured" notions in the sense that the data of an adjoint
  11. equivalence is _contractible if inhabited_.
  12. In Homotopy Type Theory, the notion of (half) adjoint equivalence lets
  13. us split the type $A \simeq B$ into _structure_ and _property_: the
  14. structure is a function $A \to B$, and the property is "being an
  15. equivalence". This is in contrast to the type of _isomorphisms_ $A \cong
  16. B$, which are the _structure_ of maps $f : A \to B$ and $g : B \to A$
  17. together with homotopies $f \circ g \sim \mathrm{id}$ and $g \circ f
  18. \sim \mathrm{id}$. Notably, the type of "isomorphism data" for a
  19. particular function is [not always a proposition], whereas [being an
  20. equivalence is].
  21. [not always a proposition]: https://cubical.1lab.dev/1Lab.Counterexamples.IsIso.html
  22. [being an equivalence is]: https://cubical.1lab.dev/1Lab.Equiv.html#isProp-isEquiv
  23. Recently, I've been working on [the 1Lab], an open-source, formalised
  24. and explorable resource for univalent mathematics. This means that,
  25. among other things, I had to write an explanation for [the proof that
  26. isomorphisms can be made into equivalences][1], i.e., the map
  27. `isoToEquiv`. Our proof comes essentially from [the Cubical Agda
  28. library], where it is presented with a single comment:
  29. ```agda
  30. -- Any iso is an equivalence
  31. ```
  32. That's helpful. So where does it come from?
  33. [the 1Lab]: https://cubical.1lab.dev
  34. [1]: https://cubical.1lab.dev/1Lab.Equiv.html#equivalences-from-isomorphisms
  35. [the Cubical Agda library]: https://github.com/agda/cubical/blob/22bea9586b67fa90cf90abea04360080d369c68c/Cubical/Foundations/Isomorphism.agda#L53-L112
  36. # Where it comes from
  37. Since _I_ know where I got it from, I knew where to start looking. On
  38. the Git log of the Cubical Agda library, we find that the Cubical Agda
  39. version of `isoToEquiv` was added in [October 31, 2018] by Anders
  40. Mörtberg, with the same handy comment and no attribution.
  41. It's reasonable to assume, then, that Mörtberg proved it himself right
  42. then and there. However, the HoTT book, published in 2013, already has a
  43. proof that any isomorphism data can be "strengthened" into equivalence
  44. data, so it seems unreasonable to assume that the first time this was
  45. formalised was 2018. Fortunately, we're not dead in the water.
  46. [October 31, 2018]: https://github.com/agda/cubical/commit/e139a6f09ea59da2032be8ebaf07e8b5fc8bc0c4
  47. The Cubical Agda implementation of `isoToEquiv` comes from [cubicaltt],
  48. an older, prototype implementation of cubical type theory. Looking at
  49. _that_ Git history, we find that it was added by.. Mörtberg again! This
  50. time on [January 4, 2016], over two years prior. Again, there is no
  51. attribution, and this is the oldest implementation of cubical type
  52. theory, so it's reasonable to assume that this is where the proof
  53. originates, right? Wrong.
  54. [cubicaltt]: https://github.com/mortberg/cubicaltt/blob/a5c6f94bfc0da84e214641e0b87aa9649ea114ea/examples/equiv.ctt#L177-L225
  55. [January 4, 2016]: https://github.com/mortberg/cubicaltt/commit/26b70046ce7e45197f14ead82daae7e0354e9945
  56. # The name "gradLemma"
  57. If you look at the commit that originally introduced a proof that `isIso
  58. f → isEquiv f` to cubicaltt, you'll see that the map _wasn't_ named
  59. `isoToEquiv`, it was named `gradLemma`. This name is _especially_
  60. unhelpful, [quoting Mike Shulman]:
  61. [quoting Mike Shulman]: https://github.com/mortberg/cubicaltt/issues/72
  62. > Generally there are two ways that theorems and lemmas are named in
  63. > mathematics: descriptively (giving some information about what the
  64. > theorem says, e.g. "the intermediate value theorem") and attributively
  65. > (giving credit to whoever proved it, e.g. "Cauchy's theorem"). Whatever
  66. > your feelings about the relative merits of the two, the name "grad
  67. > lemma" achieves neither: it conveys no information about what the lemma
  68. > says, nor does it give any credit to the people it refers to, instead
  69. > depersonalizing them as "some nameless graduate students". Moreover it
  70. > is even factually incorrect, since some of the people in question were
  71. > actually postdocs at the time.
  72. Shulman is right! The name is depersonalizing, and it does not credit
  73. the people who originally came up with the proof. So who _are_ they?
  74. Where does this proof come from? Well, reading the rest of those GitHub
  75. issues, we learn two things:
  76. 1. Mörtberg did not come up with the proof out of thin air, though as
  77. far as I can tell he was the first to adapt it to a direct cubical
  78. argument;
  79. 2. The name "gradLemma" comes from UniMath.
  80. # UniMath
  81. UniMath (**uni**valent **math**ematics) is the second oldest library for
  82. Homotopy Type Theory in a proof assistant, and the oldest actively
  83. maintained. It was, in fact, originally written by Voevodsky himself!
  84. Thus, it comes with its own proof of `isoToEquiv`, which we find [in the
  85. massive file `Foundations/PartA.v`][3]:
  86. [3]: https://github.com/UniMath/UniMath/blob/f9645aeb354f34f0841cb796e33ccc0a5cba1d67/UniMath/Foundations/PartA.v
  87. ```
  88. (** This is kept to preserve compatibility with publications that use the
  89. name "gradth" for the "grad theorem". *)
  90. Definition gradth {X Y : UU} (f : X -> Y) (g : Y -> X)
  91. (egf: ∏ x : X, g (f x) = x)
  92. (efg: ∏ y : Y, f (g y) = y) : isweq f := isweq_iso f g egf efg.
  93. ```
  94. Good to know that at least the theorem isn't _called_ "grad theorem"
  95. anymore, but there are still many references to `gradth` in the
  96. codebase. By the way, the name `isweq_iso`? [Changed by Mörtberg]! It's
  97. him we have to thank for introducing the _useful_ name `isweq_iso`, and
  98. the corresponding `isoToEquiv`. Thank goodness we don't call it "grad
  99. theorem" anymore.
  100. [Changed by Mörtberg]: https://github.com/UniMath/UniMath/pull/848
  101. But wait, the name "grad theorem" refers to *grad*uate students.. And
  102. graduate students are _people_.. So who are these people? Let's keep
  103. digging. The README to UniMath mentions that it is based on a previous library, [Foundations]:
  104. [Foundations]: https://github.com/UniMath/Foundations
  105. > The UniMath project was started in 2014 by merging the repository
  106. > Foundations, by Vladimir Voevodsky (written in 2010), \[...\]
  107. I'll cut to the chase: The history of `gradth` ends with foundations;
  108. It's been there since [the initial commit]. This means that the trail
  109. has run cold. Voevodsky certainly wasn't a grad student in 2010, he was
  110. a fields medalist! Mörtberg didn't name the theorem either. And so, I
  111. kept digging. I started looking for sources other than code: talks,
  112. papers, theses, etc.
  113. # An unlikely source
  114. [the initial commit]: https://github.com/UniMath/Foundations/commit/d56271180c00a8a545c29db06001ae71a910c1b1#diff-ba65cad07cb794c06ab63e0e04dc95d785fee1374791ea974099e355ff20ff7bR433-R439
  115. I found a handful of papers ([here] [are] [some]) which refer to this
  116. result as "the graduate theorem", but none of them mentioned _who_ the
  117. graduate students are. However, I did find a source, however unlikely.
  118. [here]: https://arxiv.org/pdf/1809.11168.pdf
  119. [are]: https://arxiv.org/pdf/1401.0053.pdf
  120. [some]: https://arxiv.org/pdf/1210.5658.pdf
  121. In 2011, Mike Shulman wrote [a series of posts] introducing the
  122. $n$-category café to the ideas of homotopy type theory. In this post,
  123. Shulman mentions the notion of equivalence following Voevodsky, but he
  124. also mentions the notion of [half-adjoint equivalence], and mentions
  125. where it comes from:
  126. > This other way to define $\mathrm{IsEquiv}$ should be attributed to a
  127. > handful of people who came up with it a year ago at an informal
  128. > gathering at CMU, but I don’t know the full list of names; maybe someone
  129. > else can supply it.
  130. [a series of posts]: https://golem.ph.utexas.edu/category/2011/03/homotopy_type_theory_ii.html
  131. [half-adjoint equivalence]: https://cubical.1lab.dev/1Lab.Equiv.HalfAdjoint.html
  132. Now, as Shulman says, he does not know the full list of names. However,
  133. Steve Awodey does, [as is stated in a comment]:
  134. > Let’s see: Mike Shulman, Peter Lumdaine, Michael Warren, Dan Licata –
  135. > right? I think it’s called “gradlemma” in VV’s coq files (although only
  136. > 2 of the 4 were actually still grad students at the time).
  137. [as is stated in a comment]: https://golem.ph.utexas.edu/category/2011/03/homotopy_type_theory_ii.html#c037120
  138. However, note the use of "right?" - this comment isn't a primary source
  139. (Awodey wasn't involved in coming up with the graduate lemma), and it's
  140. not even certain on top of that. However, you know what would be a
  141. primary source?
  142. Someone who was there.
  143. And you know who follows me on twitter?
  144. [Dan Licata].
  145. [Dan Licata]: https://twitter.com/admitscut/status/1472014521673859072
  146. # The Complete History of isoToEquiv
  147. With this, we have a full picture of the history of isoToEquiv, albeit
  148. with a handful of details still fuzzy. Here's a timeline:
  149. * (2010-??-??) Mike Shulman, Peter Lumsdaine, Michael Warren and Dan
  150. Licata come up the notion of half-adjoint equivalence in homotopy type
  151. theory, and adapt a standard result from category theory to show that
  152. any isomorphism improves to a half-adjoint equivalence. **This is the
  153. origin of `isoToEquiv`**; The "grad" in "grad theorem" refers to Licata
  154. and Lumsdaine, who were graduate students at the time.
  155. * (2010-10-04) Vladimir Voevodsky makes the first commit of Foundations,
  156. where `isoToEquiv` is present - under the name `gradth`. Nowhere in the
  157. repository, its entire history, or anywhere in Voevodsky's works are the
  158. grads from the th mentioned. There are no git logs that can trace the
  159. history of `isoToEquiv` before this point.
  160. * (2014-03-21) Foundations becomes UniMath, and the name `gradth` is
  161. kept. This is the first “leap” in the history of `isoToEquiv`, the first
  162. non-trivial historical path.
  163. * (2016-01-04) Mörtberg adapts the proof of `gradth` from UniMath to his
  164. experimental implementation of Cubbical Type Theory, which at the time
  165. was brand new. There, the result is called `gradLemma`.
  166. As far as I can tell, this is the origin of the code for `isoToEquiv`
  167. that can still be found, alive and kicking, in the Cubical library
  168. (and the 1lab) to this day. I've emailed Mörtberg to set the record
  169. straight, but I'm writing this at 11:00pm on a Friday, so I still
  170. haven't heard back. I'll update the post when (and if) he replies.
  171. * (2017-08-11) Mike Shulman files an issue in the cubicaltt repository
  172. complaining about the name `gradLemma`. Mörtberg addresses the issue by
  173. renaming it to `isoToEquiv`.
  174. * (2018-10-30) Mörtberg ports `isoToEquiv` from cubicaltt to Cubical
  175. Agda, which is where I stole it from.
  176. I am in no position to speculate as to _why_ Voevodsky did not credit
  177. Licata, Lumsdaine, Shulman and Warren with `gradth`, or why he chose a
  178. name that mentions the existence of graduate students without naming the
  179. students. It feels like a great misstep in the history of our community
  180. that such a fundamental result was never properly accredited. While the
  181. Wikipedia page for Homotopy Type Theory has mentioned Licata, Lumsdaine,
  182. Shulman and Warren as the authors of the proof [since 2014], _none_ of
  183. the primary sources I consulted - the Foundations repo, the UniMath
  184. repo, the cubicaltt repo, the Cubical Agda repo, or _any_ of the
  185. associated papers - do.
  186. [since 2014]: https://en.wikipedia.org/w/index.php?title=Homotopy_type_theory&diff=prev&oldid=638938391
  187. I'm glad the name `gradth` is no longer in widespread usage (outside of
  188. UniMath, which has neglected to remove the deprecated name). If we were
  189. to name it after people, it should be called the
  190. Licata-Lumsdaine-Shulman-Warren Theorem, and that's unwieldy. Let's
  191. stick with `isoToEquiv`, but acknowledge where it comes from.
  192. I know this post isn't what I usually write - I'm not a historian, after
  193. all - so thanks for reading it. I wanted to chronicle how I spent the
  194. afternoon and evening of a Friday in December 2021: Chasing the ghost of
  195. proper attribution. I'm probably not going to write any technical
  196. content on this blog for a while yet; I might write a short announcement
  197. of the 1lab, which otherwise takes up all of my spoons.