 So in my video on sets in Aida, I get this comment. Guy is providing some useful information. It's definitely good to understand how these things can be used further. But I make the comment that it's actually a multi-set or a bag he's showing off. And the reason for that is, you're seeing here, the set is of... What he's calling a set is of booleans. And so a set of booleans, the way a set works compared to a bag, is a set can only have a value in it once. So once that value is in there, trying to insert it into the set again should result in no change to the set because it's already in there. A bag, on the other hand, is an array in the normal sense that the value can be in there multiple times. Now you can see, I didn't need to scroll down for that, you can see where's it here, that the entire thing is being packed with falses. So keeping true to the mathematical definition of a set, there should only ever be one false in there, not 26 falses. So we get into a bit and he's saying it's the index that's being stored. Now that makes no sense and I'll show why that is now because the index is never stored. So for the most part I've copied his code over and you have the index type as it was defined from A to Z, so that's 26 letters, and the set which is indexed by the index type he just defined and is a boolean, it's still packed in the component sizes one. Because it's booleans that are being stored, the entire array should be 26 bits because each boolean can be exactly represented as a bit, either false, zero, or true, one. So because it's the booleans being stored, you can actually fit that within a component size of one. So first we're going to print out the size of the set, the set that's actually made, not the set type, but the set that's actually made. And then we're going to iterate over every element of the set that was defined and put... Now he's saying that it's the character that's being stored and the boolean just represents where it's there or not. So this is actually the character. It'll print out just fine. There's no conversion that needs to be done for a character. Now, obviously this won't... You can already see I did it. Obviously that will not work properly. It's finding a boolean being stored, not a string, or a character. Characters can freely be converted to strings. What we actually have to do is a boolean image of this. And you can see it cranks out falses. It's also not the 26 bits claimed, although we can actually tweak that if we do a... No, it still doesn't work. Oh, we'd have to do that. How do we do that for these? I believe my set size set that to 26. Oh, no, no, no, there's a special syntax for that. For my set size use 26. It's not a multiple of storage unit. Right. So we have to, at the very least, store that in 32 bits. But, as you can see... Just to make it a little bit more readable... As you can see, that's not the letters being stored here at all. This is a set of falses. Now, yes, because the index is never duplicated, you can argue that it's a set because anything is only there once. There's... This is really not a good way to do sets. And I will show a few reasons why. I would call this a bag because the contents are entirely falses. How you index this doesn't matter. It's that they're entirely falses. One of the most... Well, actually, we'll go show something he says and I'll implement that. So you can see right here, he says, change the array to be an array of packed bits and you'll definitely get that bag. Or he says, define get that bag. But I assume he means definitely get that bag. So let's do exactly that and see if the contents of the set are any different other than being the trues and falses. You know, we should get, since they're packed, if they become bits instead, and we've packed it full of falses, as bits, the entire thing should be zeros. And then this, by his own definition, will be a bag. So we need a bit type. I think there's one over in system something. Systems... I don't know. Or is it interfaces.c? Either way, we'll just define a bit because it's not a big deal. It is range zero to one. Simple enough. And we can just change this to a bit. And for the others, we'll just set that to zero. Because, like we said earlier, a boolean of false would be a bit of zero when packed. So we're packing this the same way. And one little thing that needs to change is, since bit is essentially an integer, we need the bit image instead of the boolean image. Well, that's entirely zeros now. So... Why, according to this guy, would a set of entirely false... Would a... We'll just call it a collection. Would a collection of entirely falses be a set, but a collection of entirely zeros, or be a bag? They're the same thing. And when packed, this false would actually be just a zero instead of eight zeros. These are the same thing. Literally the same thing. Now, remember, this whole thing has to do with whether or not the... What's in the set is unique. That is, that something that's in the set only once. So that the same thing is never in the set more than once. There's a fairly easy way to test for this, especially since I'm not going to need to go through the entirety of the set just to show that this... There's definitely duplicate values. I won't even need to write a separate function. We can just write this the old way. And remove those. Okay, so we're actually interested and is going through each one and... We'll do this. We'll call it first. And so each element is a boolean. So the first, I'll just mark as a boolean. And it'll be my set one. We'll change this slightly. We're E in... What, it'll be two? Because we don't want to do the very first one. Comparing the very first one to itself will obviously be true. So we don't want to do that because that would be a false positive. So we'll do two to my... Was it my set last? Oh, screw it. In this case, we know that there's 26 maximum. So it's fine. Don't hard code normally. That's bad practice. But at least for this demonstration, we know exactly what we're working with. This is just a demonstration. So we want to check the values. If first equals E... If first equals my set, and then E. I don't know, wait, that's... Wait, we're indexing by character. So I got to change this slightly. So instead this would be from B to Z. See, I normally index by numbers. But it's fine. I can index by any discreet type. Yeah. Yeah, whole numbers are enumerations. Characters are an enumeration. So for each letter between B and Z, we're going to go through and compare the first to... to anything else within the set. This is checking to see that a value only appears there once. So if it appears there once, then this will not trigger. But if this appears... If the same value within the set appears more than once, this will trigger. Or just going to put a line that says not a set. Oh, hit the wrong button. And then if this whole... Well, we'll go over to return. And then if this whole thing passes, if it doesn't find the duplicate value in there at all, then it is a set. So we'll report back that it is a set. Now we don't need to return after that because it's already the end of the program. What did I do? How do I do this, Ned? I do end it. Contact the universal integer. What line is that? Nine. Oh, yeah, yeah, yeah, yeah, yeah. Okay, this needs to actually be my set A. Because that's the first one. And there you go!