Facts first:
- If
, then
and
are both sets and
.
- If
, then
, and
does not exist (as a set).
Whether your statement is a reasonable expression of this state of facts is more a question of language and communication, than one of hard mathematical truth. You certainly have a defensible position that it is not wrong. But still it sounds pretty odd, because in order to be right, it has to be speaking of "the" intersection of a collection of sets in a situation where there is no such intersection at all.
Other than winning bar bets because the claim tricks the listener into not considering the empty collection, I have doubts that your claim serves a useful communicative purpose, standing alone.
We could imagine uttering that claim while trying to develop an automatic proof verification system, where someone had implemented a rule that for general
. But then it would be much better communication to actually point at the concrete problem for
than to merely deny that the rule is valid.
In any case, this is not a problem that is specific to set theory. We could get mostly the same discussion out of considering a statement in arithmetics such as
Answer from hmakholm left over Monica on Stack Exchange
is not necessarily
.
Videos
Facts first:
- If
, then
and
are both sets and
.
- If
, then
, and
does not exist (as a set).
Whether your statement is a reasonable expression of this state of facts is more a question of language and communication, than one of hard mathematical truth. You certainly have a defensible position that it is not wrong. But still it sounds pretty odd, because in order to be right, it has to be speaking of "the" intersection of a collection of sets in a situation where there is no such intersection at all.
Other than winning bar bets because the claim tricks the listener into not considering the empty collection, I have doubts that your claim serves a useful communicative purpose, standing alone.
We could imagine uttering that claim while trying to develop an automatic proof verification system, where someone had implemented a rule that for general
. But then it would be much better communication to actually point at the concrete problem for
than to merely deny that the rule is valid.
In any case, this is not a problem that is specific to set theory. We could get mostly the same discussion out of considering a statement in arithmetics such as
is not necessarily
.
If we're talking about the subsets of a fixed "universal" set (these form a kind of structure called a complete atomic Boolean algebra), then every collection of sets has a union and an intersection, and the intersection is contained in the union, except when the collection is empty.
More generally, in a complete lattice, every set has a supremum and an infimum, and holds except when
. For example, every set of real numbers has a supremum and an infimum in the extended real line, and
when
, but
and
.
To expand on my comment in the original post, you want to create a list of sets where each member of a given set shares at least one attribute with at least one other member of that set.
Naively, this can be solved either by finding all pairs that share an attribute and merging pairs together that have the same partner iteratively. This would be O(N^3) (N^2 for iterating over pairs, and up to N separate sets to determine membership).
You can also think of this problem as determining the connected component of a graph, where every object and every unique attribute value is a node; each object would be connected to each of its attribute values. Setting up that graph would take linear time, and you could determine the connected components in linear time with a breadth or depth first search.
I would guess that you have a relatively small set of attributes for the Person object (as compared to the number of Person objects you're considering). If you want to reduce traversing the list of Person objects multiple times, you can take a Person, put its attributes into a list of known possible connections and then move on to the next Person. With each successive Person, you see if it is connected to any prior connection. If so, then you add its unique attributes to the possible connections. You should be able to process all Person objects in one pass. It's possible that you'll have some disconnected sets in the results, so it may be worth examining the unconnected Person objects after you've created the first graph.
Well, first you have it wrong unless you say that $I=\{1,\dots,n\}$. Then the statement simplifies:
The union of $A_i$ for $i\in I$ is the set of all such $x$ that there exists $i\in I$ with $x\in A_i$.
The intersection of $A_i$ for $i\in I$ is the set of all such $x$ that for all $i\in I$ we have $x\in A_i$.
You're almost right, just all the sets is a very unfortunate (and actually wrong) thing to say here, $I$ is a single set (of indices).
A better version is
$$\bigcup_{i=1}^n A_i=\{x|\text{ for some }j\in \{1,\ldots n\},x\in A_j\}$$
$$\bigcap_{i=1}^n A_i=\{x|\text{ for all }j\in \{1,\ldots n\},x\in A_j\}$$
and from there the "plain english" version follow naturally. The union includes anything in any of the sets. The intersection contains only those things in every set.