I’m sorry, I’m having trouble understanding what the point of this statement was.
Only that your post repeated substantially just what Post #9 said, even to the extent of asking the question
after Post #9 explicitly raised (and answered, with additional discussion) a similar question for the OP’s consideration:
Maybe this will help, maybe this will just be gibberish –
A SET is made up of MEMBERS, we’ll represent members as capital letters:
{A,B,C,D}
I think you’ll agree that those four members can be anything you want, right? It could be {1,2,3,4}, it could be {a,b,c,d}, it could be {fish,cat,dog,gorilla}. The set can also (in principle though rarely in practice) be mixed, {fish, cat, a, 1}. Well, a SET can also be a MEMBER*.
If you want to understand what’s going on – after the first curly brace, STOP. From now on, replace everything in the set with a capital letter that stands in for whatever was there. If you see another pair of curly braces inside your first set, it doesn’t matter, replace that whole expression from start to end brace with a letter.
{{1,2},1,2,3} -> {A,B,C,D}. What’s A? A={1,2}, B={1}, C={2}. D={3}. When determining equality, all that matters is that the second set also has {A,B,C,D} (in any order). If it’s a subset, it has any combination of A,B,C or D in it. Again, we don’t care what TYPE of thing, A, B, C, or D are, just that they’re the same.
If you see { {a,{c,{d,e}}}, e, f}, that’s just the set {A,B,C}. Sure, A equals the really obnoxious set {a,{c,{d,e}}}, but that doesn’t matter.
For membership, A ∈ SET if, not matter what A equals, that thing is also in the set. If A = {b,c}, then the set might be something like {{b,c},d,e}->{A,B,C}.
- In a nice tongue-twisty turn of fate, this means that the set of all sets is a subset of the set MEMBERS.
ETA: I should mention that there’s no magical distinction between a and {a} – it’s a notational convention. It’s a convention that unlike SOME things is rather intuitive to the majority of people, but if you really don’t see the difference intuitively or logically, you might just have to resign yourself to accepting that they’re different because we define them as different.
We’ve been trying to answer your question about set theory as it’s used in mathematics, but now I’m wondering if your questions are really more about implementation: how sets are treated in the particular programming language or context you’re working with.
From the OP:
I don’t know whether this is what you’re looking for or not, but in case it’s any help:
You might want to try looking at the intersection of A and B (A ∩ B). If you want to see whether A and B have any elements in common, you just check whether or not their intersection is empty. If you want to see whether the one or more elements that comprise B are all in A (i.e. whether B is a subset of A), you could check whether B = A ∩ B.
It’s still a bit unclear what problem you’re trying to solve here. But it sounds like you’re working with some formal language with rules not of your own making, that you must conform to.
The best guess I can think of so far is the notion and symbolism of “supersets”, as noted in Post #10 above, which puts the “larger” set on the left-hand-side and the “smaller” set on the right-hand-side – perhaps amended to use Jragon’s suggestion (Post #15) that we should speak of “improper subsets” and “improper supersets” (and use their symbols) instead.
That’s right–{a} and {b} is not the same thing as {a, b}.
The expression “{a} and {b}” refers to two sets–the set containing only a as a member, and the set containing only b as a member–while the expression “{a, b}” refers to only one set–the set containing both (and only) a and b as members.
There are a couple of common mistakes I can imagine might have led you to think “{a} and {b} is the same as {a, b}.”
One is, you may have been thinking that “{a}” and “a” refer to the same thing. But they don’t. One refers to a, the other refers to a set containing a.
Another one is, (though this is less likely, and also harder to explain,) you may have been thinking of “and” as in some way concatenating things into sets–so that the expression “P AND Q” can be interpreted to mean “the set containing P and Q.” But that, too, is not generally true. (I can think of contexts where the prior expression could be used to mean the latter one, but there is no general equivalence.)
Okay. I believed my post had a chance at getting to the “heart” of the misunderstanding in simpler terms, and therefore believed it appropriate to post it even though it did, as you point out and as I was aware, repeat the concepts in some of the other posts.
If you felt somehow ignored or slighted, please know it wasn’t my intention. Perhaps an asterisk and a note “Senegoid has said substantially the same thing in the following quotation from post #9” would have been in order. I’ll try to remember to give that some thought in future posts.
Q: What set is a gorilla a member of?
A: Any set he wants to be a member of.
Oh shit :smack:, I failed HARD here. A={1,2}, B=1, C=2, D=3. I just accidentally reinforced your confusion with that mistake.
It’s starting to become (vaguely) clear that OP is dealing with some kind of programming language and/or data entry specification that OP himself doesn’t have control of.
Here, it becomes unclear just what distinction there might be between a, b, {a}, {b}, and {a, b}. I think there are some languages that don’t make clear distinctions in the same way that formal mathematical set theory does. Maybe there is some confusion over that, and even in the absence of confusion, there may be confusion about how some language will deal.
I vaguely feel that I recall noticing some sloppy usage in some language, but I can’t recall off-hand what the language was (JavaScript or PHP maybe, two languages about as sloppy as any you’ll find), nor what the details were.
Thank you for catching this yourself before someone else had to do it for you
[Terrible terrible thread jack warning!]Let X = the set of all sets. Does X contain itself?
Let Y = the powerset of X. Does Y contain itself? Does Y contain X? Does X contain Y?
Don’t try to enter this into a computer at home, kids.
[/Terrible terrible thread jack warning!]
No. Yes. No.
Whatever paradox you were aiming for here, you missed it.
I agree Y trivially contains X, but if X is the set of all sets, then naturally P(X) is included in that list, no?
ETA: And Y would contain itself, since X is the set of all sets, and there is some combination of sets that make up Y, then naturally that combination of sets must occur in X and show up in its power set.
The tricky “no” question is whether every set is a subset of X. The answer, of course, is no, because not every set is made up of sets and X’s domain is only sets.
An improper subset puts its feet up on the coffee table and smokes cigars without an ash-tray.
(Next: “degenerate triangles.”)
(Where X was defined as the set of all sets.)
Right, and this goes back directly to the OP’s original questions!
A set containing anything other than a set as a member (example: { 1, 2 } ), is not a subset of X, but is a member of X.
And another member of X may include the set { 1, 2 } as a member. Thus, while { 1, 2 } is not a subset of X, it may be a subset of a member of X. Or it could be a member of a subset of X. Or it could be a subset of a subset of X. Or it could be a member of a member of X.
ETA: The set of all sets is a big tent!
Not could be, is. The set of all sets contains the set of all possible set members (which is actually a superset of the set of all sets). Any set you care to dream up will necessarily be a subset of that particular member of the set of all sets.
Okay, let’s try to help out the poor OP already.
Are you writing a program or script in some programming language? Or are you trying to figure out how to enter data into an existing program using some data syntax rules?
Taking your question at face value here, it looks like the formula you want, with A (the “big” set) on the left and B (the “little” set) on the right, might be: A ⊇ B
But it’s not entirely clear from your OP just what question you are asking.
In the example: A = {a, b, c, d, g, i}, B = {c}, is B necessarily just a one-item set (being treated as a single item)? Are you asking: Is the single item c a member of the set A? (Even if your data syntax requires B to be entered as a set instead of as a single non-set item?)
Or can the set B contain multiple items, as in: A = {a, b, c, d, g, i}, B = {b, d}
and if so, is the question:
---- Is EVERY member of B also in A?
or is the question:
---- Is ANY member of B also in A?
From your other example: A = {a, b, c, d, g, i}, B = {c, h} it looks like you envision that B (the “smaller” set) could in fact be a set of multiple items, not just one item. Then my question just above is relevant: Are you asking if EVERY member of B is in A, or are you asking if ANY member of B is in A?
If this involves a programming language, what language are you using? What set operations does it contain? Does your language contain sets as a data type (or, does it have arrays that can be treated as sets)? Does it contain set-relational operators that take two sets as their operands and returns TRUE or FALSE? Specifically, can you write an expression like A ⊂ B (where A and B are sets) to get a TRUE or FALSE result? Do you also have the other set-relational operators like ⊃ (superset of), ⊆ (improper subset of, meaning subset of or same set as), ⊇ (improper superset of, meaning superset of or same set as).
Do you have set operators that let you do things like Thudlow Boink suggested above, like these?
Or, taking a hint from these remarks:
are you not doing programming at all, but simply trying to learn how to discuss this in plain English with other people?
ETA: And, seeing that this conversation is active right now, I must respectfully excuse myself to go run some errands now, before the bank closes. Back later.
It seems more like he’s going the other way – a customer has something they want done and the OP is trying to make a formal spec for the software developers.