Types versus sets (and what about categories?) (2022)
lawrencecpaulson.github.io
lawrencecpaulson.github.io
Martin-Löf very explicitly discussed the denotational meaning of his theories. See for instance Section 5 of the SEoP entry on intuitionistic type theory.
https://plato.stanford.edu/entries/type-theory-intuitionisti...
TFA is correct that type theory is syntax, but it would be wrong to think of set theory as any less syntactic to the mind of an intuitionist. The semantics is the actual mathematical ideas going on within the head of the mathematician. Both type theory and set theory must be connected to these in order to be given meaning.
I think this intuitionism in the (original) sense of Brouwer.
Martin-Löf argued for something different:
"Martin-Löf’s meaning theory of intuitionistic type theory should be understood directly and “pre-mathematically”, that is, without assuming a meta-language such as set theory."
"This meaning theory follows the Wittgensteinian meaning-as-use tradition."
Therefore the ultimate foundation must be something else, such as categories, classes and types. You can still have ZF set theory but not at the very bottom.
The author doesn't like Zermelo–Fraenkel set theory which is fine. And semantics in ZF set theory is for some theories not possible or intuitive.
Semantics in category theory sets (Topos) is usually the way to go (1).
"Topoi behave much like the category of sets" (2)
Lawvere, a renowned category theorist, wrote a book "SETS FOR MATHEMATICS", which describes different kinds of sets (topoi).
(1) https://ncatlab.org/nlab/show/relation+between+type+theory+a...
https://isabelle.in.tum.de/website-Isabelle2020/dist/library...
Maybe this is the reason for his dislike. Would like to hear more about Larry Paulson's experience.
(maybe it was no fun at all)
Types versus sets (and what about categories?) - https://news.ycombinator.com/item?id=30697421 - March 2022 (31 comments)
I am bothered by the fact that most mathematicians aren’t bothered by that! Am I missing something? Would love to understand why like, system F isn’t the foundation of math (i should care about)
Outside of logic and set theory, most mathematicians aren't really working in any particular foundation: they're working directly with the relevant structures. An ordered pair `(x,y)` can be modeled as the set `{{x},{x,y}}`, but that doesn't mean it is that set. What it is, to the extent the question is even coherent, is a thing that has the data ordered pairs are supposed to have: a first element, and a second element.
This may be true for Category Theory as well (Product of two objects):
https://en.wikipedia.org/wiki/Product_(category_theory)
But Category Theory captures the essence of Products/Pairs, so I am more inclined to accept it.
Well, yeah, but {x, y} is also a pair. How is (x, y) different? It's ordered, you say? All right, an ordering is a relation that's antisymmetric and so on, but in this case let's say we have a function that maps x to 0 and y to 1… But what is a function? Okay, a function is a type of relation, so let's define a relation first: a set of ordered pairs… oops.
The real problem with defining (x, y) = {{x}, {x, y}} is that elements of a set must also be elements of some universal set 𝓤, {x, y} ⊂ 𝓤, but as we know, there is infamously not such a thing as a "set of all things". Sets have to be typed. But in a pair, x and y can be of entirely different kinds of entities.
But an ordered set is fundamentally different than an unordered set as well!
So when we say that the carrier of a group is a set, it doesn’t have
to be specifically a ZF set; but if we imagine collecting up all
groups as a single entity, that warning light should flash. It’s
dangerous to take the collection of all sets as a single entity, then
to build on top of that. And yet, that is precisely what is done in
category theory, again and again.For those unfamiliar with groups, one way to comprehend groups (by the Cayley theorem) is to essentially imagine groups to be sets of permutations (and in this case, the Carrier set would be the set of permutations, with the group operation being composition of permutations).
I'm not sure I'm any convinced by your argument of the collection of all groups being a group either, and whether that was what was referred to by the author. In any case, I don't think that follows the usual form of the Russell's paradox or Girard's paradox. I'm fairly certain that the "warning light" that the author mentions in relation to the set of all groups is about the set being too large to be consistently considered a set, rather than anything circularly related to groups.
I have no idea what TFA tries to say, it seems to argue about aesthetics, I am not really into that. If it is very clear, and the authors enthusiasm about their favourite is sticky then sure, but TFA is unclear to me.
I found this to be careless thinking, conflating representation of thing with the thing itself.
I understood it as the author emphasizing as I believe you also wish the difference between the representation and the thing itself. Sets can be fun and useful without us resorting to reductionistic arguments about what math "is", I believe the author is saying.
Agda called types "Set", e.g:
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
This was recently deemed inappropriate:"Bye bye Set"
"Set and Prop are removed as keywords"
And they didn't get rid of Set and Prop entirely. They just made them default-imported symbols instead of keywords.
> denotes a copy of M in which every free occurrence of x has been replaced by N
...breaking it down...
> a copy of
Weird wording, but if you're used to mutability everywhere, and you want to do an immutable operation, then it makes sense to make a copy. But it's kind of like saying 4+3 'makes a copy of four which is three bigger'.
> every free occurrence
Paraphrasing, this says 'pay attention to variable scope'. If you start replacing every x within a scope, and you come across a new declaration of x inside that scope, you should ignore occurrences of that inner x, because it's a different variable (despite having the same name.)
> (λx.M)N ... M[N/x]
This one adds no clarity for me, despite being throughout the literature. Explaining that (λx.M)N is M[N/x] doesn't help a beginner, because you then immediately have to explain what M[N/x] is. N.replace(x, M) would probably suit a modern audience.
Why bother with all this nonsense? The power-to-weight ratio. λ-calculus (including β-reduction) gives you all of computing. Compared to its contemporary Turing Machine (which was super important theoretically at the time), you can just bootstrap a new language off the lambda calculus.
> Obviously, λx.M should be seen as a sort of function
The fact that lambdas can be seen as a syntax for describing functions (or function-like things) is kind of obvious to anyone who knows basic programming language theory (and many software engineers who use lambdas when they map over a list, for example).
The sentence before it about β-reduction is describing the rule for how to call a function, which we learned in high school as "plug-and-chug".
I think the confusion here might just be that the syntax is unfamiliar. You have probably seen these concepts before.