Hacker News new | past | comments | ask | show | jobs | submit login

Cardinality doesn't have to do with "counting" necessarily. Two sets X and Y are said to have the same cardinality if there is a function f : X -> Y where f is a bijection. By bijection we mean it has two properties: that for all a,b in X, if f(a) = f(b), then a = b (this is also called the injective property), and for all c in Y, there is some d in X such that f(d) = c (this is called the surjective property). Set X has cardinality less than Y if there is no such bijective function, but there is a function f: X -> Y that is injective. Conversely, X has cardinality larger than Y if there is no such bijective function, but there is a function f: X -> Y that is surjective. All you have to do to compare the size of two sets is to look at the functions mapping one to the other. No "counting" involved.



This make much more sense, so most time the cardinality which people refer is with respect to the set of natural numbers, but according to you, we can have this relation between any two sets. The problem is not make those things clear in the wording. Why not just called it "the cardinality order relation", and try it always like a binary relation, instead of a property that each set has in insolation.


Well you can use this relationship to establish the cardinal numbers. You can use "there exists a bijective function between sets X and Y" as an equivalence relation between sets. And with a equivalence relation you can talk about partitioning things into their equivalence classes. But because we are talking about a relationship between all sets it gets tricky to formally construct things (because there is no set of all sets for you to use to define things, so you can't just say "take the sets under the equivalence relations"). There are multiple ways to explicitly construct them, but they tend to be pretty complicated compared to just talking about bijections. The constructions I know about either require the axiom of choice or the axiom of regularity (every non-empty set A contains an element that is disjoint from A). But you don't need any of that to establish a lot of the properties of cardinalities


It is possible to make a set that contains all the set except itself, operationally this pretty simple, I am working on creating a language programming based on set theory, so this will be an easy way to define some notion of universal set.

fn contain(u0:(universal, set), u1:(universal, set)){ return false }

fn contain(u:(universal, set), s:set){ return true }

but don't how much logical sense it will make


If you aren’t aware of it already, you might be interested to read about Russell’s paradox [1] which shows a problem with allowing sets to be defined into existence without restriction (making Frege’s life’s work the Grundgesetze stillborn). It involves using the “set” of all things that are not a member of themselves.

[1] https://en.m.wikipedia.org/wiki/Russell's_paradox


Unfortunately the set that contains all sets except itself doesn't exist either. If such a set X existed, then you could easily build X unioned with {X}, which would be the set of all sets, which doesn't exist. You can't really avoid Russel's paradox, it prevents you from being able to make a set that is basically all sets, minus some exceptions.

But there is a way to get around Russel's paradox, the standard way is to define a new kind of object called a class. See https://en.wikipedia.org/wiki/Class_(set_theory) . Basically a class is like a set, a set can be a member of a class, and you can do most operations with sets on classes as well (union, intersection, etc). And you can create a class which is all sets satisfying some property. From this you can't have a set of all sets, but you can have a class of all sets. Russel's paradox doesn't go away, you still can't have the set of all sets (and you can't have the class of all classes), but this still gives you enough to talk about properties of all sets. See https://en.wikipedia.org/wiki/Von_Neumann%E2%80%93Bernays%E2... for an example of how to define classes. That particular example is a conservative extension of ZFC: any statement about sets that can be proved using NBG can also be proved using ZFC and vice versa (assuming ZFC is consistent). Your statement can't involve classes, because there is no definition of classes in ZFC so it wouldn't translate, but your proof in the NBG system can make use of it


Typically, unless you specify the other set, it's assumed to be N, the natural numbers. And when you have a bijection between some other set and (some subset of) the natural numbers, you're doing something equivalent to counting.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: